Name
zip.RenameFile -- rename file in zip archive
Synopsis
zip.RenameFile(id, idx, newname$[, t])
Function
This function renames the file at index idx in the zip archive specified by id to the name passed in the newname$ parameter.

If you need to rename a directory entry, newname$ must end on a trailing slash character. See Zip archive basics for details.

Note that the change to the zip archive isn't done immediately but is postponed until you call zip.CloseArchive().

The following tags are currently recognized by the optional table argument:

Encoding:
This tag can be used to set the charset encoding that for the filename. This can be one of the following special constants:

#ZIP_FL_ENC_UTF_8:
Use UTF-8 encoding. This is the default.

#ZIP_FL_ENC_CP437:
Use code page 437 encoding. Since this was the standard encoding on MS-DOS it was also the standard encoding of the original zip format. So if you need maximum compatibility, you can use this encoding but remember that it can only store Western characters.

(V1.2)

Inputs
id
identifier of the zip archive to use
idx
file to rename
newname$
new name for file
table
optional: table containing further options (see above) (V1.2)

Show TOC