Archive: NSIS doesn't include files that exist in different folders


NSIS doesn't include files that exist in different folders
NSIS doesn't include file that exists in different folders.
For example I have following structure:
source_dir/A/setting.txt
source_dir/B/setting.txt

I describe in nsi script:
Section "MainSection" SEC01
SetOutPath "$INSTDIR"
SetOverwrite try
File /r "source_dir\*"
SectionEnd

after compilling I receive installation package where file setting.txt exists in folder A but in folder B it is missed.

Can you help me with this?
Thank you


Works fine for me


I just created simple script at home under Windows XP SP3 and it works fine too.

At work I'm using script under Windows 7 64-bit with Modern UI generated by HM NIS EDIT 2.0.3.


Today I made dipper investigation and found - it doesn't work. If file setting.txt is the same in both folder, it is included only in first folder, but missed in second.

Does somebody have the same situation?


Nope, just tried it here under Win7/64 and it worked.


Have you tried using

File /r "source_dir\*.*"
instead of
File /r "source_dir\*"

Originally posted by pengyou
Have you tried using
File /r "source_dir\*.*"
instead of
File /r "source_dir\*"
Yes, I tired.
"*" - it means all files and folders will be included.
"*.*" - all files are included

I have found solution: it is necessary to add following into nsi script:
SetDatablockOptimize off