這個看似簡單的問題,winrar程式UI上可以簡單的做到,但是7-zip UI 介面就是沒看到,去google上也是找好久。Confused

 

最後終於找到7-zip官網FAQ有紀錄,但只能用command方式

How can I store full path of file in archive?

7-Zip stores only relative paths of files (without drive letter prefix). You can change current folder to folder that is common for all files that you want to compress and then you can use relative paths:

  cd /D C:\dir1\
  7z.exe a c:\a.7z file1.txt dir2\file2.txt

 

註:7z.exe一般都沒有在XP path內,只打7z.exe無法直接執行,可參考下面我目前正在使用的方式

cd /D c:\temp\
"C:\Program Files\7-Zip\7z.exe" a -tzip  C:\test1.zip test\tes1.doc
"C:\Program Files\7-Zip\7z.exe" a -tzip  C:\test1.zip test\tes2.doc
"C:\Program Files\7-Zip\7z.exe" a -tzip  C:\test1.zip test\tes3.doc

arrow
arrow

    味味A 發表在 痞客邦 留言(0) 人氣()