简体   繁体   English

批量文件,用于解锁从Internet复制的文件

[英]Batch file to unblock files copied from internet

When we copy files (dll) from internet, Win7 blocks it. 当我们从互联网上复制文件(dll)时,Win7会阻止它。 The unblock option appears as in the following image when we take the file properties. 当我们获取文件属性时,unblock选项显示在下图中。 What command can I use to unblock the file from a batch file? 我可以使用什么命令来解锁批处理文件中的文件?

在此输入图像描述

Supposedly this should work: 据说这应该工作:

echo.>myDownloadedFile.exe:Zone.Identifier

See a more detailed discussion here, Unblock a file with PowerShell? 请在此处查看更详细的讨论, 使用PowerShell取消阻止文件? , which also describes other approaches using Powershell and the streams tool from SysInternals. ,其中还介绍了使用Powershell的其他方法和SysInternals的streams工具。

To do one is as per other suggestions. 按照其他建议做一个。 ie either: 即:

echo.>myDownloadedFile.dll:Zone.Identifier

or 要么

Unblock-File myDownloadedFile.dll

but to do it 'bulk' as OP requested: 但要像OP要求那样“批量”做:

get-childitem *.jpg, *.gif | Unblock-File 

or in DOS: 或在DOS中:

FOR %a in (*.jpg *.gif) do (echo.>%a:Zone.Identifier)

你可以使用streams -d path / to / file.zip这可以在这里找到http://technet.microsoft.com/en-us/sysinternals/bb897440

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM