When you download files from the Internet, Windows adds zone information to it and stores it in the file's NTFS alternate steam. Windows 10 shows you a security warning every time you try to open it. Some file types are fully blocked from opening. SmartScreen, a security feature of Windows 10, causes this behavior. But even if SmartScreen is turned off, you still get a warning and need to unblock downloaded files. While you can unblock your files one by one as described here How to unblock files downloaded from Internet in Windows 10, it is a very time consuming operation. If you need to unblock a bunch of files downloaded from Internet in Windows 10, here is how you can do it.
When you try to open a file which was downloaded from the Internet, you see a warning like this:
To avoid it and unblock all files in a folder in Windows 10, we need to use the PowerShell command line.
Let's say you want to unblock all downloaded files in your Downloads folder located inside the user profile. This folder is used by default by almost all apps like web browsers, download managers etc, so the files there are usually blocked. To unblock them all at once, you need to do the following:
- Open PowerShell as described in the following article: All ways to open PowerShell in Windows 10.
- Type the following command:
dir c:\users\winaero\downloads -Recurse | Unblock-File
Replace the "c:\users\winaero\downloads" portion with the actual path to your folder.
- Alternatively, you can navigate to that folder using the good old CD command as follows:
Then, you can omit the folder path and execute the following command:
dir -Recurse | Unblock-File
This PowerShell command does not produce any output. It works silently and very quickly.
Tip: You can open the PowerShell command window in the desired folder directly. All you need to do is click the Explorer File menu -> Open Windows Powershell -> Open Windows Powershell. See the following screenshot:
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!
13 thoughts on “Batch unblock files downloaded from Internet in Windows 10”
Even more, as long as the Open Powershell is active when you click File, Open Powershell > Open Powershell (as it is greyed out of there is nothing in the folder) You can right click on it, and add it to your quick access toolbar making it a one click job.
Nice tip, thanks!
re: batch unblock downloaded files… You! You have extended the life of my right click button. Thank you!
While I am still on Win 8 … I have just shut smart screen off as I find it not that smart
I agree about that Smart Screen feature.
However, browsers add the blocking info to files in any case.
Another confirmation will appear when you open a file.
Easier to use the environment variable – but it might affect all users?
dir C:\Users\%username%\Downloads -Recurse | Unblock-File
No, it won’t. It will process files only for your current user account.
Does this unblock files added to the target folder AFTER the Command is run, i.e. I have a folder which is constantly having new files added to it – do I have to run the command each time I add new files to the target folder, or will all future files added be automatically ‘Unblocked’???
Add the command to Task Scheduler
Thanks, this worked like a charm. Before cannot open mp3 files – every time i had that stupid message.
Just ran command on whole my data disk – dir d:\ -Recurse | Unblock-File
Can i do it for onli one file. Not the whole folder.
I meant only
Sure. You can do it for a single file: https://winaero.com/how-to-unblock-files-downloaded-from-internet-in-windows-10/