PDA

View Full Version : XCopyFile does not seem to handle read-only files



snafner
10-01-2003, 05:07 PM
I am using the following syntax to copy an entire directory of files to a destination directory. All of the files already exist in the destination, but some of them are read-only.

XCopyfile("*.*","*.*",COMP_NORMAL)

I would expect all files to be overwritten, as I am using the COMP_NORMAL operator; however, only the read-write files are overwritten. The read-only files are left untouched and no error dialogs or error codes are generated by the XCopyFile action.

Short of having to hardwire an enumeration of the destination files which are read-only and change their attributes prior to the XCopyFile call, does anyone know how to force the copy?

Thanks for any help you can provide,

Ric