Archive: noob question re copyfiles and overwrite


noob question re copyfiles and overwrite
Hi,

Apologies if this has been answered elsewhere, but I've searched the forums and can't quite seem to find a solution to my problem. I have to produce a CD installer for several thousand files (which take up almost all of the CD), I need the application to run from CD and also to be installed to the hard drive thus negating the use of a compiled installer executable.

The CopyFiles function at first look would appear to solve my problem, in that it will allow me to copy the application and all it’s associated files from the CD. The problem comes with the requirement to update the files, which would ideally be done using “SetOverwrite ifnewer”, but if I understand the documentation and another posting on the forums, SetOverwrite will not work with the CopyFiles function???

Is there any simple way to copy a lot of files from CD to HardDisk whilst only replacing those that are newer? Any help, advise or examples would be hugely appreciated.

Thanks in advance,
M


I think you could use GetFileTime on the source file and existing file and compare the 4 values returned.

You'd need to use something like:
http://nsis.sourceforge.net/RecFind:...t%2C_FindClose

Stu