xbarns
29th January 2009 11:17 UTC
Recursively process files in folder and its subfolders.
Hi all,
i am using
FindFirst $0 $1 "${GACPath}\*.dll"
;loop:
StrCmp $1 "" +7
nsExec::ExecToStack '"$R1\gacutil.exe" /i "${GACPath}\$1" /nologo'
Pop $8
Pop $9
DetailPrint "$1: $9"
FindNext $0 $1
Goto -6
;done:
to add all DLLs in a certain directory to the assembly cache.
Now sometimes that directory can have one or more subdirectoris that also contain dlls that need to be added.
Any ideas how i cold recurse into those subdirectories?
Thanks for your help.
Anders
29th January 2009 11:44 UTC
put all that code in a function, when you detect a folder (file exist check with "path\*"), call "yourself" (with path on the stack)
xbarns
29th January 2009 12:49 UTC
You mean use IfFileExists? How wold i detect the "second" folder then?
May i ask for a little example, please.
Animaether
30th January 2009 02:24 UTC
no.. he means that you should put it all in a function and, when you find a folder, call that function itself with the path of that folder as its starting point.
Try this wiki category... there's several macros and functions in there that deal with recursing through a path:
http://nsis.sourceforge.net/Category...File_Functions
xbarns
2nd February 2009 18:22 UTC
Thanks, i have done it using
http://nsis.sourceforge.net/Search_f..._(Alternative)