DirectoryRename()

edit

Renames given directory

DirectoryRename( oldPath=string, newPath=string, createPath=boolean );

Returns: String

Argument Description
oldPath
string, required
edit

Absolute path of the directory to be renamed

newPath
string, required
edit

new name for the directory

createPath
boolean, optional
edit

if set to false, expects all parent directories to exist, true (default) will generate necessary directories

Usage Notes

edit

With Lucee 6 this function now returns the new path

Examples

edit
reNamedirectory = "directoryPath";
directoryRename(reNamedirectory,"newname");

See also