RecFind: Recursive FindFirst, FindNext, FindClose: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
m (ReqFind: Recursive FindFirst, FindNext, FindClose moved to RecFind: Recursive FindFirst, FindNext, FindClose)
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:
== Links ==
== Links ==


[http://myweb.tiscali.co.uk/imker/downloads/RecFind.nsh RecFind.nsh] (3 KB, right-click > Save As, save as RecFind.nsh in Include folder)
<attach>RecFind.nsh</attach> (right-click, Save As)


== Description ==
== Description ==
Line 11: Line 11:
It's basically the same as the standard FindFirst, FindNext and FindClose except that there is also a FindOpen. You also have a variable for the current found directory and the current found file.
It's basically the same as the standard FindFirst, FindNext and FindClose except that there is also a FindOpen. You also have a variable for the current found directory and the current found file.


Save to Include folder, then !include ReqFind.nsh in your scripts.
Save to Include folder, then !include RecFind.nsh in your scripts.


== Example of use ==
== Example of use ==

Latest revision as of 00:41, 23 December 2008

Author: Afrow UK (talk, contrib)


Links

RecFind.nsh (3 KB) (right-click, Save As)

Description

I have made these simple set of instructions to simplify recursive finding of files or directories on a system (currently all the NSIS scripts are pretty hard to understand for the average NSIS newbie).

It's basically the same as the standard FindFirst, FindNext and FindClose except that there is also a FindOpen. You also have a variable for the current found directory and the current found file.

Save to Include folder, then !include RecFind.nsh in your scripts.

Example of use

${RecFindOpen} "C:\Program Files\NSIS\Projects" $R0 $R1
 DetailPrint "Dir: $R0"
${RecFindFirst}
 DetailPrint "File: $R0\$R1"
 StrCmp $R1 "a_file.txt" Found
${RecFindNext}
Found:
${RecFindClose}

-Stu