Skip to content
⌘ NSIS Forum Archive

NSIS doesn't include files that exist in different folders

8 posts

svp78#

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
svp78#
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.
svp78#
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?
svp78#
Originally Posted by pengyou View Post
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
svp78#
I have found solution: it is necessary to add following into nsi script:
SetDatablockOptimize off