CopyFile()

Syntax

Result = CopyFile(SourceFilename$, DestinationFilename$)
Description
Copy the source file to the destination.

Parameters

SourceFilename$ The file to copy.
DestinationFilename$ The location to copy the file to.

Return value

Returns nonzero if the operation was successful or zero if it failed.

Remarks

If the destination file already exists, it will be overwritten. The FileSize() function can be used to determine if the target exists or not. If source file and destination file are the same, a copy will not occurs and zero will be returned.

See Also

RenameFile(), DeleteFile(), FileSize(), CreateFile(), OpenFile()

Supported OS

All

<- CopyDirectory() - FileSystem Index - CreateDirectory() ->