When you download a file from the Internet like images, documents, etc. to your Windows computer, they are treated as untrusted files. So if malware is downloaded in the form of JPEG, it will be able to execute anything on the computer. I am sure you have seen errors where you cannot rename the files or if it’s a document, it remains in read-only mode, and so on. However, it can be annoying if you are downloading a lot of files, and all of them should be unlocked. We have seen how to Unblock a file and how to add an Unblock file item to the context menu using PowerShell or Registry. In this post, we will share how you can bulk unblock files downloaded from the Internet.
How to find if the file is blocked?
Right-click on any of the files, and select Properties from the context menu. If the file is blocked, then under the General tab, you will have a security warning. It should say
The file came from another computer and might be blocked to help protect this computer and might be blocked to help protect this computer.
You can check the box next to Unblock, and then save the changes to unblock the file. This option is not available when you select multiple files, go to properties.
How does the Unblock-File command work?
PowerShell offers a built-in command — Unblock-File — to change the unblock status of PowerShell script files that were downloaded from the Internet, but it works on all kinds of files. Internally, the Unblock-File cmdlet removes the “Zone.Identifier alternate data stream“. It has a value of “3” to indicate that it was downloaded from the Internet.
If you apply this on PowerShell scripts, it can unblock PowerShell script files that were downloaded from the Internet so you can run them, even when the PowerShell execution policy is RemoteSigned. The syntax for the command is as follows:
Unblock-File [-Path]/-LiteralPath <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Bulk Unblock multiple files downloaded from the Internet on a Windows computer
The command needs single or multiple files. Any output which can pass a list of files to it will work. Here is an example:
- Copy the path where the blocked files are available. To do so, go to th directory where the blocked files are located, then click on the address bar of the File Explorer and press the Ctrl + C keys.
- Open PowerShell with admin privileges.
- Type the following and execute
dir <path> | Unblock-File
- The command above uses the DIR command to generate a list of files, and then it is sent to the Unblock-File command.
- You will not receive any kind of confirmation, but all the files will be unblocked.
Enter the entire path under quotations, otherwise, you will get an error. For example, if you have placed all the blocked files in the “D:\The Windows Club\Images\Blocked Files” path, the command will be:
dir "D:\The Windows Club\Images\Blocked Files" | Unblock-File
If you want only to unblock files the names of which include e.g., TWC, then the command will be like this:
dir <path>\*TWC* | Unblock-File
Those who need to confirm unblocking files one by one can add -Confirm option along with the command. It will then prompt you for each file. If you choose yes, then it will unblock the file, else it will move to the next.
It comes in very handy when you download a file from the Internet and then share it with somebody else. The data remain locked, and they will be able to rename the file unless it is unlocked. You can use this command to unlock all the files, and then send it.
I hope the post was easy to follow, and you were able to unblock multiple files or bulk files downloaded from the Internet.
How can I get all DLL files?
If the DLL files are missing, there are some ways by which you can recover them. If you think about downloading the missing DLL files from third-party websites, we do not recommend this. This is because such files can contain viruses or malware. You use built-in System File Checker and DISM tools to fix the missing DLL files. If the DLL file associated with a particular software is missing, reinstalling that software fixes this problem.
Why are downloaded files blocked?
Today, popular browsers, like Edge, Chrome, Firefox, etc., have a built-in feature to detect suspicious files and block them from downloading on your system. The most common reason why your downloads are being blocked is they are infected.
Read next: How to block EXE files from running using Group Policy in Windows.