圧縮するファイルのリスト
PS C:\Users\hoge\f> cat filename.txt "C:\Users\hoge\f\sample.exe" "C:\Users\hoge\f\sample.f" "C:\Users\hoge\f\sample.fs"
圧縮の実行。/V2 は冗長モード(1〜3)。/F filename.txt はファイルによる指定。
PS C:\Users\hoge\f> makecab /V2 /F filename.txt Cabinet Maker - Lossless Data Compression Tool PASS 1: Checking directive file(s) ---------------------------------- 1: "C:\Users\horikoshi\f\sample.exe" 2: "C:\Users\horikoshi\f\sample.f" 3: "C:\Users\horikoshi\f\sample.fs" PASS 2: Processing directive file(s) ------------------------------------ 1: "C:\Users\horikoshi\f\sample.exe" 2: "C:\Users\horikoshi\f\sample.f" 3: "C:\Users\horikoshi\f\sample.fs" ** sample.exe placed in cabinet 1.cab(1) on disk Disk 1 ** sample.f placed in cabinet 1.cab(1) on disk Disk 1 ** sample.fs placed in cabinet 1.cab(1) on disk Disk 1 Total files: 3 Bytes before: 3,817 Bytes after: 1,225 After/Before: 32.09% compression Time: 0.13 seconds ( 0 hr 0 min 0.13 sec) Throughput: 28.03 Kb/second
PS C:\Users\hoge\f> ls ディレクトリ: Microsoft.PowerShell.Core\FileSystem::C:\Users\hoge\f Mode LastWriteTime Length Name ---- ------------- ------ ---- d---- 2009/12/19 13:43 disk1 -a--- 2009/12/19 13:36 102 filename.txt -a--- 2009/07/13 15:44 3584 sample.exe -a--- 2009/07/08 11:16 116 sample.f -a--- 2009/07/08 11:21 117 sample.fs -a--- 2009/12/19 13:43 974 setup.inf -a--- 2009/12/19 13:43 283 setup.rpt
出力を指定しないと disk1 の中に 1.cab ができる。
PS C:\Users\hoge\f> cd disk1/ls Mode LastWriteTime Length Name ---- ------------- ------ ---- -a--- 2009/12/19 13:43 1355 1.cab