Batch Unblock Files

If you download a file, or receive a file by email, and save it to disk, the file is marked as downloaded from an external computer, and cannot be executed or, depending on the application, opened. You need to open the file properties dialog, and click “Unblock” to resolve the situation.

The same is true for zip files and other archives: When extracting the archive, the “blocked” flag may be set on every extracted file, and the “Unblock” button is not available if you select more than one file and open the properties dialog.

Fortunately, there is an easy solution that I found in a comment on SO:

for /F %a in ('dir /r/b/s') do @echo .>%a:Zone.Identifier:$DATA


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: