IO::RenameFile
- IO::RenameFile(currentFile, newFileName): bool
-
Renames file.
In server scripts,
IO::functions are available only if server configuration variableNXSL.EnableFileIOFunctionsis enabled (change requires server restart). They are always available in scripts run bynxscript.Table 1. Parameters currentFile
String
File to rename
newFileName
String
New file name
ReturnTRUEif renamed was successful andFALSEif not.IO::RenameFile("/tmp/oldFileName", "/tmp/mewFileName") // File with name "oldFileName" will be renamed to "mewFileName"