Old 29th November 2010, 16:23   #1
Join Date: Oct 2007
Posts: 64
Question Installing folder contents

Hello world,

what is the "official" (recommended) way to have my NSIS script install all contents of a certain source folder with all included files and subfolders (without the source folder itself), while allowing the case that the source folder is empty?

I typically use something like
SetOutPath $INSTDIR\DestinationFolder
File /r "SourceFolder\*"

but this yields a compile error if "SourceFolder" is empty.
Lenge is offline   Reply With Quote
Old 30th November 2010, 05:14   #2
Senior Member
Join Date: May 2005
Posts: 119
You can use the /nonfatal option to avoid the compile error. I am not quite sure what you mean by the first part, but I always use *.* for the file spec in this type of situation.

File /r /nonfatal "SourceFolder\*.*"
CrushBug is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump