@ffind[] function.

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Jul 6, 2008
255
4
#1
As Charles stated in another thread:
add @ffind[] function. search sub-directories like the FFIND command does.

This evolved from the recent request for the addition, optional parameters to @search to include sub-directories with the supplied path @search[program....] The other thread provides additional information that I will not repeat here. One major difference I should point out is that @search[] assumes it's locating a program, with or without extension, and this new function would require a switch or something to make that assumption.
 
#2
Code:
v:\> function ffind `%@execstr[ffind /s /k /m /f %2\%1]`

v:\> echo %@ffind[tcc.exe,g:\]
G:\TC11\tcc.exe

v:\> echo %@ffind[tcc.exe,g:\tc21]
G:\tc21\tcc.exe

v:\> echo %@ffind[tcc.exe;4nt.exe,g:\]
G:\4ntv8\4nt.exe

v:\> echo %@ffind[tcc.exe;4nt.exe,g:\tc17]
G:\tc17\tcc.exe
 
#4
Sure! It's eminently customizable. I don't think I used @SEARCH (in ~25 years or however long it has been around) before this week.. So I won't lobby for an @FFIND. If I needed such a thing, I'd make a user-defined function and, in a few weeks or months, discover it and delete it.