Archive: Copying a bunch of files


Copying a bunch of files
Hi there,

How can I copy a bunch of files, stored on 1 directory under my current .nsi file?

i.e -
myfile.nsi
res\res1.bmp
res\res2.dat
res\res3.txt

I'm looking for a function that will do, for every file on that list:
1) check if file exists
2) copy file if not exists

Is this possible?

Thanks!


# set overwrite mode, used by the file-command
SetOverwrite off # also available: on, ifnewer, ifdiff, lastused

Section "section1" s1
# set out-path to chosen directory
SetOutPath $INSTDIR
# copy files, using overwrite-setting
File /r ".\res\*.*"
SectionEnd

Thanks!! However- how can I call this Section in a list loop, and/or by passing a parameter (filename)?

Thanks!


why that?

the 'File' command copies all files itself.
and it doesnt overwrite any.


The File commands can be used to specify a file on your system that should be included and extracted during installation.

It accepts wildcards so there is no need to create a list yourself.


Thanks!

File "res\*"
Geez, that was easy :-)