Rename -- rename a file or directory (V2.0)
Rename(oldname$, newname$[, t])
This function renames a file or a directory.
oldname$ is the name of
the file or directory to be renamed and can include a path specification.
newname$ is just the desired new name for the file/directory and must
not contain any path specification.
Starting with Hollywood 10.0, this function accepts an optional table
argument which supports the following tags:
This tag allows you to specify one or more filesystem adapters that should be asked
to handle the operation. This must be set to a string containing the name(s) of one or
more adapter(s). Defaults to the adapter set using SetDefaultAdapter().
See Loaders and adapters for details. (V10.0)
This tag can be used to specify additional data that should be passed to filesystem
adapters. If you use this tag, you must set it to a table of key-value pairs
that contain the additional data that should be passed to plugins. See User tags for details. (V10.0)
- file or directory to rename
- new name for the file/directory
- optional: table argument containing further options (see above) (V10.0)
Renames the file "image1.png" to "image2.png".