Skip to content
⌘ NSIS Forum Archive

Installing folder contents

2 posts

Lenge#

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.
CrushBug#
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\*.*"