How to batch Unblock multiple files downloaded from the Internet

How to batch Unblock multiple files downloaded from the Internet

When you upload a file from the Internet like images, documents, etc., they are treated as unapproved files. So if malware is downloaded in JPEG format, it can execute anything on the computer. I’m sure you’ve seen errors where you can’t rename files or if its document stays in read only mode etc. However, this can be annoying if you download a large number of files, and all of them must be unlocked. We have seen how to unblock a file and how to add an Unblock file item to the context menu. In this article, we will explain how to unblock bulk files downloaded from the Internet.

How do I know if the file is blocked?

Right-click on one of the files and select Properties from the context menu. If the file is blocked, under the General tab, you will get a security warning. You have to say

The file is from another computer and can be blocked to help protect this computer and can be blocked to help protect this computer.

You can check the box next to Unblock, then save the changes to unblock the file. This option is not available when you select several files, access the properties.

How does the Unblock-File command work?

PowerShell offers integrated control – Unblock-file – to change the unlock state of PowerShell script files that have been downloaded from the Internet, but it works on all kinds of files. Internally, the Unblock-file cmdlet removes the “Zone.Identify other data flow“. 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 have been downloaded from the Internet so that you can run them, even when the PowerShell execution policy is RemoteSigned. The command syntax is as follows:

Unblock-File
[-Path]/-LiteralPath
[-WhatIf]
[-Confirm]
[]

Unblock multiple files downloaded from the Internet

Unblock multiple files downloaded from the Internet

The commander needs one or more files. Any output that can pass a list of files to it will work. Here is an example:

  • Copy the path where blocked files are available
  • Open PowerShell with administrator privileges.
  • Type the following and run

dir | Unblock-File

  • The above command uses the DIR command to generate a list of files, then it is sent to the Unblock-File commandlet.
  • You will not receive any confirmation, but all files will be unlocked.

If you only want to unblock files whose names include, for example, TWC, the command will be like:

dir *TWC* | Unblock-File

Those who have to confirm file unlocking one by one can add -To confirm with the order. It will then ask you for each file. If you choose yes, then it will unlock the file, otherwise it will go to the next.

It is very convenient when you download a file from the Internet and then share it with someone else. The data remains locked and can rename the file unless it is unlocked. You can use this command to unlock all files and then send it.

I hope the message was easy to follow and that you were able to unblock multiple files or bulk files downloaded from the Internet.

Leave a Reply