Make FFIND a bit more friendly?

May 20, 2008
11,424
99
Syracuse, NY, USA
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
 
Dec 7, 2009
238
2
Left Coast, USA
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).
 

rps

Jul 6, 2008
436
6
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.
 
May 20, 2008
11,424
99
Syracuse, NY, USA
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.
 
May 20, 2008
11,424
99
Syracuse, NY, USA
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.
 

rconn

Administrator
Staff member
May 14, 2008
12,365
150
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.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,469
88
Albuquerque, NM
prospero.unm.edu
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.
 
May 20, 2008
11,424
99
Syracuse, NY, USA
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?
 

rconn

Administrator
Staff member
May 14, 2008
12,365
150
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.
 
May 20, 2008
11,424
99
Syracuse, NY, USA
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.
 

rps

Jul 6, 2008
436
6
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
Thread starter Title Forum Replies Date
J ffind does not find files Support 4
D ffind hangs on large file Support 18
Alpengreis ffind dialog (/W) problem Support 4
vefatica FFIND, temp files? ... not deleted? Support 0
S FFIND text that includes " Support 7
D ffind /e hangs Support 7
vefatica FFIND needs work Support 12
Joe Caverly Multiple Text Searches at once using FFIND or TPIPE Support 4
Kachupp FFIND TPIPE Support 9
Gamegod ffind bug with chinese Support 2
vefatica FFIND and multi-line regular expressions Support 4
M Trying to use ffind with a @file.lst doesn't work Support 4
vefatica Corruption from FFIND? Support 5
vefatica FFIND /S and System32? (and an OT mystery) Support 14
T FFind - can we display n number of lines after the find? Support 2
vefatica Help nit (FFIND and DIR with /S) Support 0
R ffind not setting %_ffind_ vars if /f is used Support 7
M FFIND wordA AND wordB Support 4
vefatica FFIND and _? Support 1
B Fixed FFIND doesn't find last character in file without CR/LF at EOF Support 1
dcantor How to make line numbers fixed width in FFIND Support 11
vefatica FFIND /S, find directory with specified name? Support 7
D Why doesn't ffind find directory? Support 3
C FFind /w works but FFind /= doesn't? Support 2
vefatica FFIND goes crazy Support 8
Stefano Piccardi TCC 13 vs. TCC 14 different FFIND /E"d$" output Support 1
Steve Pitts How to? FFIND, regular expressions and double quotes Support 4
vefatica FFIND /S in my profile directory Support 2
A How to? Pass output from ffind to another command in a BTM file Support 5
Phileosophos Can FFIND match file names with a regular expression? Support 19
vefatica FFIND and size ranges Support 1
R How to use ffind to find older files? Support 9
J How do I - ffind - with multiple items Support 10
M FFIND and LIST does not work for UTF-8 fles Support 10
C FFIND ERRORLEVEL Support 2
L FFIND no result display Support 10
H Directory wildcards not working with ffind Support 3
D ffind and directories Support 2
Stefano Piccardi detecting BOM, FFIND multibyte regex Support 18
dcantor FFIND syntax -- is /E"regex" /X supported? Support 2
S FFIND and quoted strings Support 4
S FFIND /E"reg exp" : not case insensitive Support 4
J Problem with FFIND Support 1
Peter Murschall Single-line Do-CMD is a bit uncooperative. Support 6
Joe Caverly VBEEP on 64-bit Support 3
vefatica SETP usually fails with a 32 bit process Support 4
rconn Dropping 32-bit support in Take Command & TCC? Support 14
dcantor How to? Can 32-bit TCC be run on a system with 64-bit TCMD and TCC installed? Support 6
T 32 and 64 bit simultaneous portable versions Support 2
CWBillow Everything.exe - 64-bit? Support 8

Similar threads