Archive: Add files and folders recursively


Add files and folders recursively
I am trying to add three folders on the c: drive root level to the installer.


I can not get NSIS to recursively get all folder under the folders specified. It will get all files but not folders.

Code:
Here is a short example of what I am doing, set the outpath and get the contents of the folder (files only, but want to recursively go down levels). do I have to manually go down each level?
InstallDir "C:\test_install_rapier_c\"
Page directory
Page instfiles

Section ""

SetOutPath $INSTDIR\rapier\rapier_console
; Put files there
File "C:\rapier\rapier_console\"
; Set output path to the directory.
SetOutPath $INSTDIR\rapier\rapier_console\documentation
; Put files there
File "C:\rapier\rapier_console\documentation\"


If I use –r I get the following error:

File –r "C:\rapier\rapier_console\"
or File –r "C:\rapier\rapier_console"
or File –r "C:\rapier\rapier_console\*.*"

File: "-r" -> no files found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
/oname=outfile one_file_only)
Error in script "C:\Documents and Settings\mcguidwi\Desktop\NSIS_rapier\rapier1.nsi" on line 112 -- aborting creation process
Compilation time: 1.157 sec.


Thanks


You've answered your problem in your post.

Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
/oname=outfile one_file_only)
Stu

Okay,

I see what I have been doing i was typing -r not /r

Thanks and sorry for wasting everyones time


Not at all; all posts here are valuable to other users :)

Stu