File functions allow you to manipulate local and remote files. The file functions support UNC Network path (for example “\\Server1\Share1\test.txt”). However it is recommended to write and read only files that reside inside the current project directory. To get the current Project directory you can use the function “GetPrjDir“. This function always returns the directory where the GpMainPj.xml file is located, always terminated with an “\”.
Please keep in mind that VisXpert uses C-Style string escaping. So you have to use double \ for an single \ in the resulting filename. The first backslash is the escape character, and the second the final character.
CopyDir
Declaration
CopyDir(string src, string dst, bool fMove)
Function
Copies the files from the source directory src to the destination directory dst if fMove is false, or moves the files from the source directory src to the target directory dst if fMove is true.
Example
CopyDir(‘D:\\Data’, ‘X:\\BackupData’, false)
Copyfile
Declaration
CopyFile(string srcFile, string dstFile)
Function
Copies the source file srcFile to dstFile (destination file).