コマンドライン パラメーター
Bandizip (Bandizip.exe) とそのコンソールアプリケーション (bz.exe) は、次のコマンドラインパラメーターをサポートしています:
# Bandizip.exe <command> [<switches>...] <archive> [<files>...] [<path_to_extract>]
# Bandizip.exe <bcommand> [<switches>...] [<files>...]
<アーカイブ>
設定で指定された操作を実行します。通常はアーカイブを開くだけです。
<コマンド>
a | アーカイブにファイルを追加 |
x | フル パスを指定してファイルを展開 |
t | アーカイブの整合性をテスト |
d | アーカイブからファイルを削除 |
c | 新規圧縮 (または既存のファイルを上書き) |
cd | [新規圧縮] ダイアログボックスを表示 |
rn | アーカイブ内のファイルの名前の変更 |
l | アーカイブからファイルを一覧表示する (bz のみ) |
/cmdfile | Read command lines from specified file |
<Bコマンド> バッチ コマンド
bc | 各ファイル/フォルダー名に圧縮します。同じアーカイブ名が存在する場合、アーカイブは "ファイル名 (2)" の書式で作成されます。宛先フォルダーが指定されていない場合、デフォルトの宛先フォルダーは元のファイルまたはフォルダーがある場所になります。 |
bx | 各アーカイブを宛先フォルダーに展開します。宛先フォルダーが指定されていない場合、デフォルトの宛先フォルダーは各アーカイブがある場所になります。 |
bt | 各アーカイブの整合性をテストします。 |
<スイッチ>
<スイッチ> (Bandizip のみ)
圧縮してメール送信 | |
-target:dlg | 宛先フォルダーの指定を求めるダイアログボックスを表示し、宛先フォルダー内のアーカイブ名フォルダーにファイルを抽出します。 -o でフォルダーを指定すると、それがダイアログボックスのデフォルトフォルダーになります。 |
<スイッチ> (bz のみ)
-list:v | コマンドlを使用する場合、ファイルの詳細情報を表示します。 |
-list:s | コマンドlを使用する場合、ファイルの名前のみを表示します。 |
-consolemode:ansi | 出力 txt ファイルを ANSI で保存します。 |
-consolemode:utf8 | 出力 txt ファイルを UTF-8 で保存します。 |
例
アーカイブを開く
Bandizip.exe sample.zip
新規圧縮 (既存ファイルを上書き)
Bandizip.exe c c:\sample.zip c:\src\
Bandizip.exe c c:\sample.zip c:\src1\ c:\src2\
アーカイブにファイルを追加
Bandizip.exe a c:\sample.zip c:\src\sample.txt
Bandizip.exe a c:\sample.zip c:\src\sample1.txt c:\src\sample2.txt
Bandizip.exe a c:\sample.zip c:\src\*.txt c:\src\*.jpg
アーカイブからファイルを削除
Bandizip.exe d c:\sample.zip sample.txt
Bandizip.exe d c:\sample.zip *.txt
Bandizip.exe d c:\sample.zip *.tmp *.bak
宛先パスにアーカイブを展開
Bandizip.exe x -o:c:\dest\ c:\sample.zip
アーカイブにファイルを追加、パスワードを「Passw0rd」に 設定、確認なしで既存のファイルをすべて上書き、ダイアログボックスを閉じる
Bandizip.exe a -y -p:Passw0rd test.zip c:\src d:\src
複数のアーカイブから1つのフォルダーにファイルを展開します
Bandizip.exe bx -o:c:\dst a.zip b.zip c.zip
ここで抽出(スマート)機能を使用して、複数のアーカイブから目的のフォルダーにファイルを抽出します
Bandizip.exe bx -o:c:\dst -target:auto a.zip b.zip c.zip
複数のフォルダー (a, b, c) を各フォルダーの名前 (a.zip, b.zip, c.zip) で圧縮します
Bandizip.exe bc a b c
アーカイブの最上位フォルダーを指定する
Bandizip c -root:top test.zip abc.txt

(bz.exe) 新しいアーカイブを作成する
bz c test.zip test

アーカイブ内のファイルの名前を変更する
abc.txt の名前を xyz.txt に変更する
Bandizip rn test.zip abc.txt xyz.txt
サブフォルダー内の abc.txt の名前を xyz.txt に変更する
Bandizip rn test.zip sub/abc.txt sub/xyz.txt

AAA.txt を XXX.txt に、BBB.txt を YYY.txt に名前変更する
Bandizip rn test.zip AAA.txt XXX.txt BBB.txt YYY.txt
ワイルドカードを使用してファイルを展開する
ファイル名にワイルドカードを使用して、ファイルを展開したり、アーカイブをテストしたりします
Bandizip x *.zip

Bandizip t ABC??.zip
複数のフォルダーを個別に圧縮する
それぞれの名前でフォルダーを圧縮し、宛先フォルダーにアーカイブを作成
Bandizip bc -aoa -o:d:\backup c:\src\folder1 c:\src\folder2 c:\src\folder3
c:\src\folder1 → d:\backup\folder1.zip
c:\src\folder2 → d:\backup\folder2.zip
c:\src\folder3 → d:\backup\folder3.zip
Read and execute command lines from specified file
Save long command lines as TXT file and call it
Bandizip /cmdfile cmdfile.txt
Bandizip /cmdfile c:/test/cmdfile.txt

Spaces in pahts
Use quotation marks when specifying long filenames or paths with spaces
Bandizip t "c:\folder name\file name.zip"
Bandizip x -o:"c:\out folder\" "c:\folder name\file name.zip"
Extract specified files only
Use filenames or wildcards to specify files you want from archive
Bandizip x sample.zip test.txt
Bandizip x sample.zip a.txt b.txt
Bandizip x sample.zip *.jpg
Bandizip x -r sample.zip *.jpg