cjs
24th March 2003 21:52 UTC
Confuzed on IfFileExists command. (usage)
I am almost done creating a script, I am confuzed on the usage of the IfFileExists command. Here is what I want to do.
IFFILEEXISTS MM_*.mdb then I want the installer to skip the files MM_*.mdb.
IFFILEEXISTS WhatsNew.mdb I want to ALWAYS overwrite with a newer version.
Thanks
-Chris
Joel
24th March 2003 22:01 UTC
Function "SomeThing"
ifFileExists $SYSDIR\myfile.dll 0 NoThere
... ;If is it there
NoThere:
...;Nop, is not here
FunctionEnd
Helps? :D
cjs
24th March 2003 22:17 UTC
I created this:
Function "Check if data files exist"
ifFileExists MM_*.mdb 0 NoThere
... ;If is it there
NoThere:
...;Nop, is not here
FunctionEnd
Function "Check if data files exist"
ifFileExists WhatsNew.mdb 0 NoThere
... ;If is it there
NoThere:
...;Nop, is not here
FunctionEnd
after I see if the files exist or not I want the installer to keep going.
It was a little hard to understand your response.
kichik
24th March 2003 22:18 UTC
You don't need IfFileExists to overwrite. NSIS defaults to always overwrite so unless you have used SetOverwrite to set the overwrite flag to something else you're set.
cjs
24th March 2003 22:23 UTC
ok, so how would I format the command to not overwrite a specific set of files?
SO far I have:
Function "Check if data files exist"
ifFileExists MM_*.mdb NoThere
;If is it there
NoThere:
;Nop, is not here
FunctionEnd
kichik
24th March 2003 22:28 UTC
Use SetOverwrite off, no need for IfFileExists.
cjs
24th March 2003 22:33 UTC
I need overwrite to be off for all files except MM_*.mdb
ok, thats one problem fixed.. it will always overwrite. :)
kichik
24th March 2003 22:39 UTC
An example:
SetOverwrite off
File bla
.txt
File blue.txt
SetOverwrite on
File MM_*.mdb
SetOverwrite off
File onemore.txt
File myprog.exe
File yougetthepoint.itk
>
cjs
24th March 2003 22:41 UTC
Thanks, examples are awesome!