Skip to main content

The "xzip_rename" Function

Syntax#

xzip_rename(arch, file, name);
ArgumentTypeDescription
archstringThe full path and filename of the archive to create
filestring/integerThe name or index of a file to rename
namestringThe new file name to apply

Description#

Renames a file or folder inside an archive created with xzip_create. Also returns true or false to indicate if the operation succeeded. Note that this includes failure to rename a file flagged as read-only. (This can be determined with xzip_get_readonly.)

If a folder is input, the file argument must include the folder's relative path with no beginning or ending slash. However, no relative path should be supplied for regular files or for name.

Note that this script does not rename the archive itself! For that, use the built-in file_rename function.

Example#

xzip_rename("C:\\archive.xz", "file3.png", "image.png");