Directory wildcards not working with ffind

Mar 20, 2009
35
0
#1
I have tried using directory wildcards and the seemed to work ok with dir or pdir but the same argument with ffind does not work.
example:

C:\Howard\working>pdir/(f) "c:\Program Files\JP*\"*\*.exe
ide.exe
ShrAlias.exe
tcc.exe
tcmd.exe
updater.exe

C:\Howard\working>ffind "c:\Program Files\JP*\"*\*.exe

0 files

This also fails with just the single wildcard \*\
 
Mar 20, 2009
35
0
#3
FFIND is one of the few commands that does not implement directory wildcards because it's not meaningful. (Your example does the same thing as DIR or PDIR, only not as well.)
The documentation for directory wildcards is very limited. There is more information in the what's new area than in the File Selection/wildcards and regular expression section of help. This directory wildcards would be useful if /t option was used with ffind.

After thinking about it using /s with directory wildcards seems to be confusing and I think I got TCC to crash in some cases before I realized the conflict.

Additional documentation of directory wildcards would be useful.
 

rconn

Administrator
Staff member
May 14, 2008
10,653
97
#4
The documentation for directory wildcards is very limited. There is more information in the what's new area than in the File Selection/wildcards and regular expression section of help. This directory wildcards would be useful if /t option was used with ffind.
Windows goes to great lengths to prevent directory wildcards from working. It took a couple thousand lines of code and additional custom code for every file-handling command or function to support it, so (like CLIP:) it only gets added where it's most sensible / useful.

FFIND is particularly problematic, but I'll see if something can be done to support it in the case of text searching.

After thinking about it using /s with directory wildcards seems to be confusing and I think I got TCC to crash in some cases before I realized the conflict.
As the help says, combining /S with directory wildcards is a sure path to destruction. I doubt you'll crash in TCC code, but you can certainly easily get into near-infinite loops and blow your stack, or crash inside Windows APIs that don't expect to be called recursively.