2015年7月14日火曜日

Windowsの標準コマンドでファイル分割する方法 makeCAB

  1. CAB ファイルの作成
Microsoft MakeCAB User's Guide
CAB ファイルの詳細

Windowsの標準コマンドでファイル分割する方法です。

ファイル分割
  1.  directive fileの用意(ex. makeCab.ddf)
    1. .Set Compress=ON              ; Turn compression on
    2. .Set Cabinet=ON               ; Turn cabinet file creation on
    3. .Set CabinetNameTemplate=splited.*.cab ; 分割ファイル名
    4. .Set MaxDiskSize=4718592  ;4718592Byte
    5. マニュアル類リンク.zip        ; 分割するファイル名
  2. コマンド実行(ファイル分割する)
    1. makecab /F makeCab.ddf
      1. splited.*.cabなど作られる(*.inf,*.rptは不要)
分割したファイルの結合
  1. ファイル分割したファイルの1個目をダブルクリックする
    1. splited.1.cab
    ぷちねた
    1. Variable Summary

    2. Standard VariablesDescription
      Cabinet=ON | OFFTurns Cabinet Mode on or off
      CabinetFileCountThreshold=countThreshold count of files per Cabinet
      CabinetNamen=filenameCabinet file name for cabinet number n
      CabinetNameTemplate=templateCabinet file name template; * is replaced by Cabinet number
      ChecksumWidth=1 | 2 | ... | 8Max low-order hex digits displayed by INF csum parameter
      ClusterSize=bytesPerClusterCluster size on diskette (default is 512 bytes)
      Compress=ON | OFFTurns compression on or off
      CompressedFileExtensionChar=charLast character of the file extension for compressed files
      CompressionMemory=15 | 16 | ... | 21The window size for LZX compression
      CompressionType=MSZIP | LZXCompression engine
      DestinationDir=pathDefault path for destination files (stored in cabinet file)
      DiskDirectoryn=directoryOutput directory name for disk n
      DiskDirectoryTemplate=templateOutput directory name template; * is replaced by disk number
      DiskLabeln=labelPrinted disk label name for disk n
      DiskLabelTemplate=templatePrinted disk label name template; * is replaced by disk number
      DoNotCopyFiles= ON | OFFControls whether files are actually copied (ACME ADMIN.INF)
      FolderFileCountThreshold=countThreshold count of files per Folder
      FolderSizeThreshold=sizeThreshold folder size for current folder
      GenerateInf=ON | OFFControl Unified vs. Relation INF generation mode
      InfXxx=stringSet default value for INF Parameter Xxx
      InfCabinetHeader[n]=stringINF cabinet section header text
      InfCabinetLineFormat[n]=format stringINF cabinet section detail line format
      InfCommentString=stringINF comment string
      InfDateFormat=yyyy-mm-dd | mm/dd/yyINF date format
      InfDiskHeader[n]=stringINF disk section header text
      InfDiskLineFormat[n]=format stringINF disk section detail line format
      InfFileHeader[n]=stringINF file section header text
      InfFileLineFormat[n]=format stringINF file section detail line format
      InfFileName=filenameName of INF file
      InfFooter[n]=stringINF footer text
      InfHeader[n]=stringINF header text
      InfSectionOrder=[F]*INF section order (disk, cabinet, file)
      MaxCabinetSize=sizeMaximum cabinet file size for current cabinet
      MaxDiskFileCount=countMaximum count of files per Disk
      MaxDiskSize[n]=sizeMaximum disk size
      MaxErrors=countMaximum errors allowed before pass 1 terminates
      ReservePerCabinetSize=sizeBase amount of space to reserve for FCRESERVE data
      ReservePerDataBlockSize=sizeAmount of space to reserve in each data block
      ReservePerFolderSize=sizeAmount of additional space in FCRESERVE for each folder
      RptFileName=filenameName of RPT file
      SourceDir=pathDefault path for source files
      UniqueFiles=ON | OFFControl whether duplicate destination file names are allowed

    0 件のコメント:

    コメントを投稿