|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Junior Member
|
Allow for possibly non-existing recursive File instances
I am trying to make an NSIS script that will compile in 2 different file structures. I think the /nonfatal switch for File is what I want, however it does not seem to work recursively? Unless I'm making a stupid mistake?
Explanation... I want to be able to use the File command, recursively, and nonfatally. I want to be able to do something like... File /r "../STUFF/*.*" and have it just be ignored if the STUFF directory does not exists, OR if the STUFF directory is empty. If STUFF is present and does contain files I want them to be compressed and added to my archive. File /r /nonfatal "../STUFF/*.*" does not seem to work!! It presents the "no files found" error at compilation. What kind of logic can I write that would be able to test if a file/directory, relative to the compiler, is present? IfFileExists will not work for me because it is doing a compare of the end-user situation at runtime, and I require this kind of logic at the compiler. I'm familiar with {If} and all that logic, but how to I ask it about files relative to the compiler? Any ideas? Thanks -Michael |
|
|
|
|
|
#2 | |
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
Quote:
Why not just open windows explorer and see if ../STUFF/ exists? Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
|
|
|
|
|
|
#3 | ||
|
Junior Member
|
Quote:
Quote:
(unless you mean there's a way to use "windows explorer" though scripting means to do this? If so, please elaborate.) |
||
|
|
|
|
|
#4 | |
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
Quote:
Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
|
|
|
|
|
|
#5 |
|
Junior Member
|
OK I've figured this out. Undocumented syntax alert....
File /r /nonfatal "../STUFF/*.*" does NOT work. "no files found" error during compile. File /nonfatal /r "../STUFF/*.*" DOES work!! This allows for recursive inclusion of files or directories which may not exist. Evidently the order of the switches is very important. le sigh. -Michael |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|