Archive: CopyFiles while excluding a directory


CopyFiles while excluding a directory
I am writing an installer that patches a program, but before patching, the entire directory is backed up.

The backup is in $INSTDIR\Backup\<date>. Previous patches also are located in $INSTDIR\Backup. So if I use CopyFiles $INSTDIR\*.* $INSTDIR\Backup\<date>, the file size will grow exponentially because all of the previous backups will be located in $INSTDIR\Backup\<date>\Backup. Hell, eventually some will even be in $INSTDIR\Backup\<date>\Backup\<older date>\Backup\<even older date>\Backup.

So my question is, there a way to use CopyFiles and exclude files or directories? It would be a major pain in the ass to go through and delete $INSTDIR\Backup\<date>\Backup every singe time.

I cannot simply copy files only, because there are user created directories that must also be copied.

I tried googling this, but google is intent on only linking me to pages regarding the Files command - so it was of no use.


Oh... false alarm. I tested some code and apparently it is not an issue.