CopyOSFile function

Copies an operating system file to another operating system file.

result = CopyOSFile(srcfile, destfile, overwriteflag)

The CopyOSFile function has the following parameters.

ParameterDescription
srcfileSpecifies an operating system file or list of files. The file name includes the operating system drive and path.
destfileSpecifies the name of the destination table.
overwriteflagDetermines whether or not to overwrite existing destfile.

Value Description
0 - Do not overwrite (default).
1 - Overwrite file, unconditionally
resultA 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.
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
  • guides/programming/programmers_reference_manual/copyosfile.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1