1
7zip:将存档的LastWriteTime设置为与内容一样旧
在Windows上,使用7za.exe v9.38,如何将存档的LastWriteTime(或CreationTime)设置为与内容相同?例如:我有一个“toto.txt”文件,创建于2015年1月1日,最后一次写入。 7za.exe a -t7z toto.7z toto.txt “toto.7z”的创作将于今天开始。 使用info-zip.org中的zip.exe,参数为 -o -o使zipfile与最新条目一样旧 谢谢! 编辑:您可以这样做: $srcDate = (Get-ChildItem $fileToCompress).LastWriteTime $dstFile = Get-ChildItem $7zFile $dstFile.LastWriteTime = $srcDate 但是通过简单的命令切换会更容易。