Syntax
CopyFile <frompath> <topath> [Overwrite]Description
Copy a file from the local machine or from the Internet.Parameters
<frompath>
- The file to copy. This may be the name of a local file or a URL specifying a file on the Internet.
<topath>
- The new file.
Overwrite
- Optional. If present, this parameter causes the destination file, if it exists, to be overwritten. The default behavior is not to perform the copy if the destination file exists.
Remarks
This statement is generally the easiest way to obtain a copy of an web page from the Internet.No error is returned if the copy is unsuccessful. It may be necessary to check to see whether the file was copied successfully with CountFiles or FirstFile if there is a possibility of failure.
Example
CopyFile "c:\autoexec.bat" "c:\autoexec.sav"
CopyFile "http://www.p1.com/index.html" "c:\p1homepage.html"The first line in the example makes a copy of the autoexec.bat file. The second line copies the P1 Systems homepage from the Internet.