IO::CopyFile
- IO::CopyFile(sourceFileName, destinationFileName): bool
-
Makes a copy of source file or folder to destination file or folder and returns
TRUEif action was successful.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 sourceFileName
String
Source file/folder name
destinationFileName
String
Destination file/folder name
ReturnTRUEif copy was successful andFALSEif not.IO::CopyFile("/tmp/source", "/tmp/destination") // Will copy "/tmp/source" file content to "/tmp/destination" file.