Archive: Exclude a specific sub directory


Exclude a specific sub directory
Dear all,

I'm using CopyFiles like below,

CopyFiles /SILENT "$EXEDIR\AppName\*.*" "$INSTDIR"

With the above command i'm able to copy all the files including all the subdirectories to my installation folder,
the thing is want to exclude a specific subdirectory let us say "images". Because in my application i have 2GB sized images folder is there, i don't want to install that every time, infact when the installer chooses the Checkbox for images in the previous screens of setup then only images should copy, that i can achieve, but how to exclude copying that folder using the above.

Expecting solution.





Thanks in advance,
Srinivas N


CopyFiles does not have an exclusion switch (presumably because it uses a Windows API at run-time).

You should use FindFirst, FindNext and FindClose to search the folder to copy folders from so that you can exclude the images folder. Use \*.* to check that a found file is actually a folder. Also, FindFirst/FindNext will return . and .. for directory names which you should always check for (you don't want to copy them!)

Stu