Skip to content
⌘ NSIS Forum Archive

File command.

2 posts

mgillespie#

File command.

Have a simple question about how the file command works internally to NSIS.

Here is my problem:

I have a directory structure, and I have added it to my project as with a wildcard specifier and recursive search. I also specify that all files should be overwritten.

SetOverwrite try
File /nonfatal /r "MyDirectory\*.*"

This works fine, but I have 1 exception to this rule, as single file that I want to leave, if present.

Can I simply add a

SetOverwrite try
File /nonfatal /r "MyDirectory\MySpecificFile.EXE"


Will this work? Or will it store 2 copies of the file, and overwrite the file on the 1st statement?

Is there a simple way to accomplish this? I want to keep the massive advantage that wildcard and relative directories give me, that I can chuck new files in there, and they automatically get included in the install.

Thanks.