This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: XCopyFile does not overwrite file if it is newer
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 14, 2012
07:20 AM
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
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
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 15, 2012
04:24 AM
instead of COMP_NORMAL use INCLUDE_SUBDIR