When we copy files (dll) from internet, Win7 blocks it. The unblock option appears as in the following image when we take the file properties. What command can I use to unblock the file from a batch file?
Press Ctrl+A to select all the folders. Right click on any folder and click Properties. b. Click Unblock button present under the General tab.
You can check the box (in Windows 10) or click the Unblock button (in Windows 7/8) to unblock the file. However, if you have multiple files, you cannot select more than one and view the properties to unblock all of the files at once. Instead, you will have to check each file separately and unblock them one at a time.
When used in a command line, script, or batch file, %1 is used to represent a variable or matched string. For example, in a Microsoft batch file, %1 can print what is entered after the batch file name.
Supposedly this should work:
echo.>myDownloadedFile.exe:Zone.Identifier
See a more detailed discussion here, Unblock a file with PowerShell?, which also describes other approaches using Powershell and the streams
tool from SysInternals.
To do one is as per other suggestions. i.e either:
echo.>myDownloadedFile.dll:Zone.Identifier
or
Unblock-File myDownloadedFile.dll
but to do it 'bulk' as OP requested:
get-childitem *.jpg, *.gif | Unblock-File
or in DOS:
FOR %a in (*.jpg *.gif) do (echo.>%a:Zone.Identifier)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With