LoginSignup
0
0

More than 3 years have passed since last update.

lhaplusを利用したパスワード付き圧縮

Last updated at Posted at 2020-04-01

分割された大量のファイルをパスワード付きzipでそれぞれ圧縮する必要があるため、オプションや使用例などまとめてみました。

前提条件:
以下の点が連番となるため、エクセルの concat 関数とフィル機能を利用して実行コマンドの作成を自動化する。

連番項目 ファイル名の例 エクセルの機能・関数など
圧縮後のファイル名 test-01.tar.gz.zip フィル機能
圧縮対象ファイル名 test.tar.gzaa =CHAR(CODE(C1)+1)とフィル機能

※備考:
アルファベットはオートフィル機能で連番することが出来ない模様

使用するオプション:

オプション名 用途 使用例
/c: 圧縮タイプ /c:zip
/n: 圧縮後のファイル名(フルパス) /n:C:\work\test-01.tar.gz.zip
/p: パスワード /p:password

使用例:

"C:\Program Files (x86)\Lhaplus\Lhaplus.exe" /c:zip /n:C:\work\test-01.tar.gz.zip /p:password ./test.tar.gzaa
"C:\Program Files (x86)\Lhaplus\Lhaplus.exe" /c:zip /n:C:\work\test-02.tar.gz.zip /p:password ./test.tar.gzab
"C:\Program Files (x86)\Lhaplus\Lhaplus.exe" /c:zip /n:C:\work\test-03.tar.gz.zip /p:password ./test.tar.gzac
"C:\Program Files (x86)\Lhaplus\Lhaplus.exe" /c:zip /n:C:\work\test-04.tar.gz.zip /p:password ./test.tar.gzad
"C:\Program Files (x86)\Lhaplus\Lhaplus.exe" /c:zip /n:C:\work\test-05.tar.gz.zip /p:password ./test.tar.gzae
"C:\Program Files (x86)\Lhaplus\Lhaplus.exe" /c:zip /n:C:\work\test-06.tar.gz.zip /p:password ./test.tar.gzaf

※注意点:
 圧縮対象ファイル名の前に ./ を入力していないとエラーで圧縮できない。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0