georgiy_senenko
Level 5

XCopyFile does not overwrite file if it is newer

Hello,

My InstallScript project contains function which should copy files from one directory to another and overwrite existing ones, but I noticed that files are not overwritten if one in target directory is newer than in source.
I used COMP_NORMAL (which I suppose should always overwrite existing files)parameter in XCopyFile, i.e.
nResult = XCopyFile(SourceDir ^ CONFIG_DIR ^ folderToCopy ^ "*.*", DataDir ^ folderToCopy ,COMP_NORMAL );

I also tried CopyFile function
nResult = CopyFile(SourceDir ^ CONFIG_DIR ^ folderToCopy ^ "*.*", DataDir ^ folderToCopy ^ "*.*");

but the results is still the same.

Could you please point what might be wrong here?

Thank you in advance.

Regards, Georgiy
Labels (1)
0 Kudos
1 Reply
KEiGHT
Level 6

instead of COMP_NORMAL use INCLUDE_SUBDIR
0 Kudos