Description

Copies an operating system file to another operating system file.

Note: This is a Windows only function.

Syntax

result = UTILITY("COPYFILE",srcfile, destfile)

Parameters

The COPYFILE service 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.
resultA boolean value. If true then the copy was successful otherwise an error occurred.

Note

If destfile exists and overwriteflag = 1, the file is copied and result = 1. The nonzero result does not indicate an error, but rather that destfile was overwritten.

See Also

CopyOSFile()

Example

/* copy C:\AUTOEXEC.BAT to C:\AUTOEXEC.SAV */
 
declare function Utility
retval = Utility("COPYFILE" , "C:\AUTOEXEC.BAT", "C:\AUTOEXEC.SAV")
  • No labels