相关疑难解决方法(0)

如何将单个txt文件移动到PowerShell 3中的zip

我正在尝试将一个文本文件复制/移动到zip.我不想解压缩它,复制文件并将其压缩回来.我们有什么办法可以直接将文本文件复制或移动到PowerShell中的zip文件中.当我在powershell中这样做的时候,它正在那之后,当我试图查看拉链时,它说的是无效的路径.

Powershell命令:

$A = "20160914.4"

New-Item "C:\test\VersionLabel.txt" -ItemType file

$A | Set-Content "C:\test\VersionLabel.txt"

Copy-Item "C:\test\VersionLabel.txt" "C:\test\Abc.zip"  -Force
Run Code Online (Sandbox Code Playgroud)

错误:压缩文件夹无效

powershell

5
推荐指数
2
解决办法
6530
查看次数

标签 统计

powershell ×1