Function Reference

FileCopy

Copies one or more files.

FileCopy ( "source", "dest" [, flag] )

 

Parameters

source The source path of the file(s) to copy. Wildcards are supported.
dest The destination path of the copied file(s).
flag [optional] this flag determines whether to overwrite files if they already exist:
 0 = (default) do not overwrite existing files
 1 = overwrite existing files

 

Return Value

Success: Returns 1.
Failure: Returns 0.

 

Remarks

The destination directory must already exist.
See FileFindFirstFile for a discussion of wildcards.

 

Related

FileMove, FileDelete, DirCopy

 

Example


FileCopy("C:\*.au3", "D:\mydir\*.*")

; method to copy a folder (with its contents)
DirCreate("C:\new")
FileCopy("C:\old\*.*", "C:\new\")