"This file came from another computer..." - how can I unblock all the files in a folder without having to unblock them individually?
If you download a .ZIP
and unzip it, the individual files will be marked as the same zone as the .ZIP
. Almost every time I have a folder full of "blocked" files, this is how I got them.
Before unzipping, click the Unblock button on the .ZIP
.
PowerShell, available here, has an Unblock-File
cmdlet that will do this task for you. To unblock all of the files in a directory, you'd issue the following command.
dir c:\mydir -Recurse | Unblock-File
Unblock-File doc
It's quite simple, NTFS attached a data stream (that IDs "unsafe files") to the file when it is just downloaded from the Internet.
Do recursively remove this stream for all files, follow these steps :
- Download the Streams CLI executable from Microsoft
- Put the streams.exe executable in your Windows directory (or anywhere that the system can find it)
- Run this line in the command line :
streams -s -d directory
It will then remove all of the data streams from all files recursively in the directory - you have now successfully unblocked all files.