====== CopyOSFile function ====== ==== 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//.\\ \\ __Value__ __Description__\\ 0 - Do not overwrite (default).\\ 1 - Overwrite file, unconditionally| |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|Get_Status()]] to check for errors in copying the files.||| ==== See Also ==== [[copyfile_service|Utility("COPYFILE")]] ==== 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