DDF File Format and Command ReferenceThis is a basic command format for DDF files used with the Microsoft MakeCAB.exe compression utility.
;Comment (anywhere on a DDF line)
src [dest] [/inf=yes|no] [/unique=yes|no] [/x=y ...]File Copy command
dest [/x=y ...]File Reference command
.Define variable=[value]Define variable to be equal to value (see .Option Explicit)
.Delete variableDelete a variable definition
.DumpDisplay all variable definitions
.InfBegin Disk | Cabinet | FolderCopy lines to specified INF file section
.InfEndEnd an .InfBegin section
.InfWrite stringWrite “string” to file section of INF file
.InfWriteCabinet stringWrite “string” to cabinet section of INF file
.InfWriteDisk stringWrite “string” to disk section of INF file
.New Disk | Cabinet | FolderStart a new Disk, Cabinet, or Folder
.Option ExplicitRequire .Define first time for user-defined variables
.Set variable=[value]Set variable to be equal to value
%variable%Substitute value of variable
<blank line>Blank lines are ignored
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
CompressionType=MSZIPCompression 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=[D | C | 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 desintation file names are allowed
Details of selected commands and variables.Define variable=[value] Define variable to be equal to value.
To use variable, surround it with percent signs (%) -- %variable%.
Using an undefined variable is an error, and will cause MakeCAB to stop before pass 2.
value may include references to other variables.
Leading and trailing blanks in value are discarded.
Blanks may be enclose in quote (“) or apostrophe (‘) marks.
Explicit percent signs (%), quotes (“), or apostrophes (‘) must be specified twice.
NOTE: If .Option Explicit is specified, then you must first use .Define to define any user-defined variables before you can use .Set to modify them. For standard MakeCAB variables, .Define is not permitted, and only .Set may be used on. If .Option Explicit is not specified, then .Define is equivalent to .Set.
.Set variable=value Set variable to be equal to value.
To use variable, surround it with percent signs (%) -- %variable%.
Using an undefined variable is an error, and will cause MakeCAB to stop before pass 2.
value may include references to other variables.
value may be empty, in which case variable is set to the empty string.
Leading and trailing blanks in value are discarded.
Blanks may be enclose in quote (“) or apostrophe (‘) marks.
Explicit percent signs (%), quotes (“), or apostrophes (‘) must be specified twice.
NOTE: If .Option Explicit is specified, then you must first use .Define to define any user-defined variables before you can use .Set to modify them. For standard MakeCAB variables, .Define is not permitted, and only .Set may be used on.
DestinationDir=path Path prefix to store in cabinet file for each file in the cabinet.
Default: .Set DestinationDir= ; Default is no path prefix
path is concatenated with a path separator (“\”) and the target file name on File Copy Commands to produce the file name that is stored in cabinet file. EXTRACT.EXE will use this file name as the default name when the file is extracted.
SourceDir=path The default path used to locate source files specified in File Copy Commands.
Default: .Set SourceDir= ; Default is to look in the current directory
path is concatenated with a path separator (“\”) and the source file name on the File Copy Command to produce the file name used to find the source file.
If path is empty, then the source file name specified on the File Copy Command is not modified.
UniqueFiles=ON | OFF Controls whether destination file names in a layout must be unique..
Default: .Set UniqueFiles="ON" ; File names must be unique
If UniqueFiles is ON, MakeCAB checks that all destination file names (names stored on disks or in cabinets) are unique, and generates an error (during pass 1) if they are not. ON is the default, since using the same filename twice usually means that the same file was accidentaly included twice, and this would be a waste of disk space.
If UniqueFiles is OFF, MakeCAB permits duplicate destination file names.
The /UNIQUE parameter may be specified on individual File Copy commands to override the value of UniqueFiles.
Sample DDF File.OPTION EXPLICIT
.Set Cabinet=off
.Set Compress=off
.Set MaxDiskSize=CDROM
.Set ReservePerCabinetSize=6144
.Set DiskDirectoryTemplate=".."
.Set CompressionType=MSZIP
.Set CompressionLevel=7
.Set CompressionMemory=21
.Set CabinetNameTemplate="HART.CAB"
.Set FolderFileCountThreshold=1
;"Setup\Setup.Lst"
;"Setup\setup.exe"
.Set Cabinet=on
.Set Compress=on
;
;Bootstrap
;
"Bootstrap\ASYCFILT.DLL"
"Bootstrap\COMCAT.DLL"
"Bootstrap\msvbvm60.dll"
"Bootstrap\OLEAUT32.DLL"
"Bootstrap\OLEPRO32.DLL"
"Bootstrap\SETUP1.EXE"
"Bootstrap\ST6UNST.EXE"
"Bootstrap\STDOLE2.TLB"
"Bootstrap\VB6STKIT.DLL"
;
;WinSysPath
;
"WinSysPath\comdlg32.ocx"
"WinSysPath\DartMail.dll"
"WinSysPath\DartSock.dll"
"WinSysPath\DartUtil.dll"
"WinSysPath\DartZip.dll"
"WinSysPath\ic32.dll"