Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

FFIND and _?

May
13,008
174
If I ask FFIND to find a file, it returns 0 whether or not the file is found.
Code:
v:\> ffind foooo

      0 files

v:\> echo %_?
0

v:\> ffind process.txt
V:\process.txt

      1 file

v:\> echo %_?
0

If I ask it to find text, it returns 0 whether or not the text is found.
Code:
v:\> ffind /t"foo" process.txt

  0 lines in      0 files

v:\> echo %_?
0

v:\> ffind /t"auto" process.txt

---- V:\process.txt
ftp://lucky.syr.edu/4plugins/4autotray.zip

  1 line in      1 file

v:\> echo %_?
0

WAD?
 
WAD. As with DIR, not finding something isn't an error. FFIND returns non-zero only if there's an error of some type (syntax, OS, whatever).

If you want to see if FFIND found any files or text, you should be using the command variables (i.e., %_ffind_files, %_ffind_matches).
 

Similar threads

Back
Top