Batch unblock files downloaded from Internet in Windows 10

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:Windows 10 SmartScreen Warning

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:

  1. Open PowerShell as described in the following article: All ways to open PowerShell in Windows 10.
  2. 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.

  3. Alternatively, you can navigate to that folder using the good old CD command as follows:
    cd c:\users\winaero\downloads

    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:

That's it.

Support us

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!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

13 thoughts on “Batch unblock files downloaded from Internet in Windows 10”

  1. 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.

    1. 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.

  2. Easier to use the environment variable – but it might affect all users?
    dir C:\Users\%username%\Downloads -Recurse | Unblock-File

  3. 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’???

  4. 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

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.