Description
Copies an operating system file to another operating system file.
Syntax
result = CopyOSFile (srcfile, destfile, overwriteflag)
Parameters
The CopyOSFile function has the following parameters.
Parameter | Description | ||||||
---|---|---|---|---|---|---|---|
srcfile | Specifies an operating system file or list of files. The file name includes the operating system drive and path. | ||||||
destfile | Specifies the name of the destination table. | ||||||
overwriteflag | Determines whether or not to overwrite existing destfile.
| ||||||
result | A Boolean value. If true then the copy was successful. If false the copy encountered an error. |
Note: While result will contain a return value the safest method to ensure proper processing occurred, use Get_Status() to check for errors in copying the files.
See also
Example
declare function CopyOSFile, Get_Status declare subroutine FsMsg srcfile = 'c:\temp\demo_cust.xml' destfile = 'c:\temp\copyosfile.xml' overwriteflag = 0 result = CopyOSFile(srcfile, destfile, overwriteflag) status = Get_Status(errCodes) if status then FsMsg(errCodes) end