Welcome!

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

SignUp Now!

Make FFIND a bit more friendly?

May
12,834
163
Can you make FFIND a little more friendly? Why won't it search the whole drive with no fuss? I don't have to go out of my way to see them with DIR!

Code:
v:\> ffind /s c:\*exception.log

      0 files

v:\> dir /b /s c:\*exception.log
C:\ProgramData\JP Software\Take Command 21\IDE.exception.log
C:\ProgramData\JP Software\Take Command 21\tcc.exception.log
C:\ProgramData\JP Software\Take Command 21\TCC500.exception.log
C:\ProgramData\JP Software\Take Command 21\tcmd.exception.log
C:\ProgramData\JP Software\Take Command 22\IDE.exception.log
C:\ProgramData\JP Software\Take Command 22\tcc.exception.log
C:\ProgramData\JP Software\Take Command 22\tccw.exception.log
C:\ProgramData\JP Software\Take Command 22\tcmd.exception.log
C:\ProgramData\JP Software\Take Command 23\ide.exception.log
C:\ProgramData\JP Software\Take Command 23\TCC.exception.log
C:\ProgramData\JP Software\Take Command 23\TCMD.exception.log
C:\ProgramData\JP Software\Take Command 23\tcmdx.exception.log
C:\ProgramData\JP Software\TCC 21\IDE.exception.log
C:\ProgramData\JP Software\TCC 21\tcc.exception.log
 
I'm using an older TCC version (20), for what it's worth. And:

D:\> ffind /s c:\*exception.log

C:\apps\CMDdebug\CMDebug.exception.log
C:\Program Files\JPSoft\TCMD19_x64\tcc.exception.log
C:\TakeCommand19\tcc.exception.log
C:\TakeCommand19\tcmd.exception.log
C:\TakeCommand20\tcc.exception.log
C:\TakeCommand20\tcmd.exception.log

6 files

Or:

D:\> everything c:*exception.log

Same result, only the result is displayed 5X faster (perhaps faster than that).
 
Code:
v23.00.21_$ver

TCC  23.00.21 x64   Windows 10 [Version 10.0.17134.112]

v23.00.21_$ffind /s /a c:\*exception.log
C:\Documents and Settings\All Users\JP Software\Take Command 21\IDE.exception.log
C:\Documents and Settings\All Users\JP Software\Take Command 21\tcc.exception.log
C:\Documents and Settings\All Users\JP Software\Take Command 21\tcmd.exception.log
C:\Documents and Settings\All Users\JP Software\Take Command 22\IDE.exception.log
.................................... many more .................
No problems here, using Win10 x64 with TCC V23.
 
C:\ProgramData is hidden and FFIND just doesn't process it. Its subdirectories and the files therein are not hidden. That's unlike DIR.
Works fine here, even in x86. Do you have an alias for FFIND?

And why do you want to use FFIND instead of DIR?
No alias. Does it process things inside a directory with the hidden attribute? ... not here.

I don't think of DIR as a tool for finding things. That's what FFIND is for (hence its name), and, unlike DIR, FFIND can look for text. If I used DIR to find files, I'd have to remember to give it a switch (/B or /F) to make its output like that of FFIND, and I'd have to use a different tool if I were looking for text in files.
 
If you want to search hidden directories, the correct syntax for FFIND would be:

Code:
ffind /a: /s c:\*exception.log
Yes, and that's what bugs me. DIR /S lists the contents of hidden directories without an attribute option. And that might also cause FFIND to return hidden files (which I may not want to see). Where to search and what to search for should be controlled sepatately.

FFIND's help says of "/A:"
Code:
Select only those files that have the specified attribute(s) set.

It would be nice if that were how it works.
 
I'm not sure I understand where you're going with this -- on the one hand, you want FFIND to behave like DIR and search hidden directories, and on the other hand you might want FFIND to *not* behave like DIR and *not* search hidden directories.

Where to search and what to search for should be controlled sepatately.

Which is how FFIND already behaves. DIR doesn't because of (wait for it) ... CMD compatibility.
 
DIR and FFIND both have /ND to prevent searching into hidden directories. You might add, say, /NZ to prevent searching into system directories. Your /N... parser is shared between DIR, FFIND, and several others, right?

I see Vince's point. FFIND can't search into hidden/system subdirectories without also including hidden/system files.
 
I said
Where to search and what to search for should be controlled sepatately.
And you said
Which is how FFIND already behaves.
So how do I tell FFIND /S to search hidden directories and not return hidden files?

I can answer that (and it doesn't make much sense to me):
Code:
ffind /a:-h /s c:\abc.txt;*exception.log
The "/A:-h" causes FFIND to look in c:\programdata (hidden) when it otherwise wouldn't ... and not return hidden files (c:\programdata\abc.txt). That's highly unintuitive and I would never have gleaned it from the help.

How about returning hidden files but not looking in hidden directories?
 
DIR and FFIND both have /ND to prevent searching into hidden directories. You might add, say, /NZ to prevent searching into system directories. Your /N... parser is shared between DIR, FFIND, and several others, right?

No, the /N parsing is not shared between commands.

I see Vince's point. FFIND can't search into hidden/system subdirectories without also including hidden/system files.

There's no distinction to be made there -- if a file is in a hidden directory, it's effectively a hidden file.
 
Why does
Code:
ffind /a:-h /s ...
make it look in hidden directories?

And why in the world is c:\programdata hidden in the first place?

Here, c:\programdata is the target of the simlinkd "c:\users\all users". Why is that the default location for tcmd.ini and the exception logs? If TCMD/TCC is installed for all users, it would make more sense if, by default, each user had his own INI file.
 
What syntax will locate a hidden file in a non-hidden directory?
I tried:
Code:
v23.00.23_$attrib C:\JPSoft\TCMD19x64\IDE.exception.log
_H_A___________  C:\JPSoft\TCMD19x64\IDE.exception.log

v23.00.23_$ffind /a:h /Nd /s c:\*exception.log

      0 files
Obviously not locating the 1 hidden ide.exception.log file which does exist in a non-hidden directory.
In the following, based on the docs, I was expecting to see all *exception.log's , including the hidden file above, in the output.
Code:
v23.00.23_$ffind /a: /Nd /s c:\*exception.log
C:\JPSoft\TCMD19x64\tcc.exception.log
C:\JPSoft\TCMD19x64\tcmd.exception.log
C:\JPSoft\TCMD19x64\Beta\TCC.exception.log
C:\JPSoft\TCMD19x64\Beta\tcmd.exception.log
C:\JPSoft\TCMD20x64\IDE.exception.log
C:\JPSoft\TCMD20x64\tcc.exception.log
C:\JPSoft\TCMD20x64\tcmd.exception.log
C:\JPSoft\TCMD21x64\IDE.exception.log
C:\JPSoft\TCMD21x64\tcc.exception.log
C:\JPSoft\TCMD21x64\tcmd.exception.log
C:\JPSoft\TCMD22x64\tcc.exception.log
C:\JPSoft\TCMD23x64\tcc.exception.log
C:\JPSoft\TCMD23x64\tcmd.exception.log

     13 files
If I remove the /Nd, there are many more files found including "C:\JPSoft\TCMD19x64\IDE.exception.log".
Using /Nd with FFind seems to be preventing the location of any hidden file regardless of its' location in the DIR structure.
What am I missing?

I have used ffind in several batch files and aliases over the years and never noticed this specific behavior. Guess I need to revisit what I think the docs mean regarding /Nd with /a:. Perhaps a warning in the FFind /a docs is in order.
 

Similar threads

Back
Top