File Commands SECTION 6 Functions and Methods
80
6-9-2 CopyFile
Syntax
returnstate = CopyFile("sourcename", "destname")
Remarks
Typical Example
CopyFile("c:\autoexec.bat", "c:\autoexec.old")
The file "c:\autoexec.bat" is copied to the file "c:\autoexec.old".
CopyFile("c:\logging\*.dlv", "a:\backup")
The data log files (ending in dlv) in "C:\logging" are copied to the "\backup"
directory on drive A:
6-9-3 DeleteFile
Syntax
returnstate = DeleteFile("filename")
Remarks
Typical Example
DeleteFile("c:\pagename.pag")
The file "c:\pagename.pag" is deleted.
6-9-4 EditFile
Syntax
returnstate = EditFile("filename")
Remarks
Typical Example
EditFile("C:\report3.txt")
FileExists
Syntax
returnpoint = FileExists (filename)
Remarks
Argument Type Description
returnstate bool Returnstate is '1' if the function is successful, or
'0' otherwise.
sourcename string Pathname of file to be copied. May include a
"*" wildcard character.
destname string Pathname of destination of copy. If path name
does not exist it is created.
Argument Type Description
returnstate bool Returnstate is '1' if the function is successful, or
'0' otherwise.
Filename string Pathname of file to be deleted.
Argument Type Description
returnstate bool Returnstate is '1' if the function is successful, or
'0' otherwise.
Filename string Pathname of file to be edited.