Skip to content
⌘ NSIS Forum Archive

Copying and empty directory

3 posts

kook04#

Copying and empty directory

In my script I am attempting to do the following:

SetOutPath "$INSTDIR"
File /r ..\..\config
File /r ..\..\data


The problem is that the "config" directory is an empty directory, so the compilation of my .nsi script is failing saying that it couldn't find any files (or something of that nature).

How can I copy an empty directory? As an alternative, how do I create a new directory?

Thanks,

Kennedy
mauvecloud#
File /r ..\..\config
wouldn't create a "config" directory on the target machine anyway. I don't think NSIS supports "copying" an empty directory, but you can use CreateDirectory, and possibly add the "/nonfatal" switch to your File command if you don't know before compiling whether the directory will be empty.