[Windows] Copy File -with Flags for Overwrite
Posted: Sun Jul 08, 2001 10:47 pm
Restored from previous forum. Originally posted by wayne1.
Code updated for 5.20+
Edited by - wayne1 on 09 July 2001 00:22:53
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