Copies one or more files.
FileCopy ( "source", "dest" [, flag] )
|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.
Can be a combination of the following:
0 = (default) do not overwrite existing files
1 = overwrite existing files
8 = Create destination directory structure if it doesn't exist (See Remarks).
; Method to copy a folder (with its contents)
FileCopy("C:\Temp\*.txt", "C:\Temp\TxtFiles\", 8)
; RIGHT - 'TxtFiles' is now the target directory and the file names are given by the source names
FileCopy("C:\Temp\*.txt", "C:\Temp\TxtFiles\", 9) ; Flag = 1 + 8 (overwrite + create target directory structure)
; Copy the txt-files from source to target and overwrite target files with same name