MPQ-Editor Help

add

Adds one or more files into the MPQ. Replaces existing files.

Syntax
add MpqFile [SourceFile] [TargetName] [/wav] [/c] [/auto] [/r]

MpqFile

Name of the MPQ to be used for this operation.

SourceFile

Name of source file. Can contain wildcards.

TargetName

Target file name (or directory name) in MPQ.

/wave

Add the file as WAVE file.

/c

Use data file compression.

/auto

Choose compression by file type.

/r

Recurse subdirectories.

Errors

Not enough space on the disk

If such an error occurs when adding files, you should recreate the archive by specifying the maximum number of files.

example.bat

rem Set variables. set MPQEditor=D:\MPQEditor.exe set MapFile=D:\MyMap.w3x set MapFileBackup=D:\MyMap_backup.w3x set MapTempDir=D:\MyMapTempDir rem Extract the files to a temporary folder. rd %MapTempDir% /s /q %MPQEditor% /extract %MapFile% "*" %MapTempDir% /fp rem Create backup echo F|xcopy %MapFile% %MapFileBackup% /y rem Delete map file del %MapFile% rem Create a new archive and set the file limit to 500. %MPQEditor% /new %MapFile% 500 rem Add files to archive %MPQEditor% /add %MapFile% "%MapTempDir%" "\" /r /c /auto

Last modified: 13 December 2024