Name
Rename -- rename a file or directory (V2.0)
Synopsis
Rename(oldname$, newname$[, t])
Function
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:

Adapter:
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)

UserTags:
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)

Inputs
oldname$
file or directory to rename
newname$
new name for the file/directory
t
optional: table argument containing further options (see above) (V10.0)
Example
Rename("image1.png", "image2.png")
Renames the file "image1.png" to "image2.png".

Show TOC