" 7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -mhe=on -p**** "C:\tmp\test2.zip" "C:\tmp\"test2.txt"
我正在尝试重构此代码。这将创建test2.zip并压缩test2.txt
必须像
那样重构"7z" a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -mhe=on -p**** "C:\tmp\test2.zip" "C:\tmp\test2.txt"
在nodeJS中:
var uploadFolder = "C:\tmp\test2.zip";
var fileNmae = "test2.txt";
var command = ' "C:\\Program Files\\7-Zip\\7z.exe" a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -mhe=on -p**** "' + uploadFolder + '" "C:\\tmp\\"' + fileName ;
如何重构此命令,使其看起来像这样:
"7z" a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -mhe=on -p**** "C:\tmp\test2.zip" "C:\tmp\test2.txt"