15

当我们从 Internet 复制文件 (dll) 时,Win7 会阻止它。当我们获取文件属性时,取消阻止选项如下图所示。我可以使用什么命令从批处理文件中取消阻止文件?

在此处输入图像描述

4

3 回答 3

11

据说这应该有效:

echo.>myDownloadedFile.exe:Zone.Identifier

在此处查看更详细的讨论,使用 PowerShell 取消阻止文件?,其中还描述了使用 Powershell 和streamsSysInternals 工具的其他方法。

于 2013-03-07T05:34:35.463 回答
10

做一个是根据其他建议。即:

echo.>myDownloadedFile.dll:Zone.Identifier

或者

Unblock-File myDownloadedFile.dll

但要按照 OP 的要求“批量”执行:

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

或在 DOS 中:

FOR %a in (*.jpg *.gif) do (echo.>%a:Zone.Identifier)
于 2016-07-22T03:47:51.660 回答
1

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

于 2013-03-07T05:33:06.650 回答