Code updated for 5.20+
Code: Select all
; PB WINDOWS VERSION
; COPYS FILE TO ANOTHER LOCATION BUT WILL NOT OVERWRITE IF THE FLAG IS SET
; Specifies how this operation is to proceed if a file of the same name
; as that specified by lpNewFileName already exists.
; If this parameter is TRUE And the new file already exists, the function fails.
; If this parameter is FALSE And the new file already exists, the function overwrites the existing file And succeeds.
; If the function succeeds, the return value is nonzero.
; If the function fails, the return value is zero.
Result = CopyFile_("C:\A\test2.x","C:\A\Test\test2.x",1 )
;Set to 1 it won't overwrite, set 0 to overwrite