尝试在Powershell中压缩文件Write-Zip时出错

时间:2013-01-09 16:33:32

标签: powershell pscx

在尝试使用Powershell中的Write-Zip压缩文件时,我遇到了一个奇怪的错误。有趣的是,当我直接运行命令时它工作正常,但当我把它放入脚本时给我以下错误。

Not a valid Win32 FileTime.
Parameter name: fileTime

这是我使用的命令:

Write-Zip -Path $zipDir -OutputPath $zipFile 

$zipFile = \\brtna01b\lynchk\My Documents\Scripts\Jan2013.zip
$zipDir = \\brtna01b\lynchk\My Documents\Scripts\Jan2013\*.csv

它将创建zip文件,但不会将csv文件移动到其中。

0 个答案:

没有答案
相关问题