The "xzip_move" Function
#
SyntaxArgument | Type | Description |
---|---|---|
arch | string | The full path and filename of the archive to create |
dir | string | The internal path of the destination folder to move into |
file1 | string/integer/array/keyword | The name or index of a file to move, or array of files (or keyword 'all' for all files) |
[file2] | string | Optional: Additional files to move (arrays and keywords not accepted) |
#
DescriptionMoves one or more files to a subfolder within an archive previously created with xzip_create
. Upon extraction, files will appear in the new subfolder. If any subfolder in the destination path does not exist, it will be created.
If a folder is input, all files inside will be moved to the new location--the relative path will not be preserved.
Also returns true
or false
to indicate if the operation succeeded or failed. Note that this includes failure to move a file flagged as read-only. (This can be determined with xzip_get_readonly
.)
note
If multiple files are input, even a single error will return false
even though other files succeeded. In this scenario, use xzip_report
to retrieve a list of failed files.
As archives have no mount point, you should not supply a drive letter or leading slash when specifying a destination folder. Use ""
to move files to the root directory of the archive.
important
Due to GameMaker's string handling, slashes in paths should be escaped (i.e. \\
, not \
). Do not add a final slash to directories!
Note that this script does not move the archive itself! For that, use the built-in file_copy
and file_delete
functions.