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 directories

Jun
789
7
I thought that

ffind /a:d /s Foo

would let me find all directories named "Foo", but it doesn't seem to always do that. Can anyone explain the results below? I find them inexplicable. E.g., why should searching for "Foo*" find Foo, but searching for "Foo" doesn't?

C:\Junk>dir

Volume in drive C is OS Serial number is 1ce5:1203
Directory of C:\Junk\*

3/05/2010 12:45p DIR .
3/05/2010 12:45p DIR ..
0 bytes in 0 files and 2 dirs
205,416,271,872 bytes free

C:\Junk>mkdir Foo

C:\Junk>ffind /a:d foo

0 files

C:\Junk>ffind /a:d foo*
C:\Junk\Foo

1 file

C:\Junk>mkdir Foo\Bar

C:\Junk>ffind /a:d /s bar
C:\Junk\Foo\Bar

1 file

C:\Junk>mkdir Foo\Aaa

C:\Junk>ffind /a:d /s bar
C:\Junk\Foo\Bar

1 file

C:\Junk>ffind /a:d /s bar*
C:\Junk\Foo\Bar

1 file

C:\Junk>Foo\

C:\Junk\Foo>ffind /a:d bar

0 files

C:\Junk\Foo>ffind /a:d /s bar

0 files

C:\Junk\Foo>dir

Volume in drive C is OS Serial number is 1ce5:1203
Directory of C:\Junk\Foo\*

3/05/2010 12:46p DIR .
3/05/2010 12:46p DIR ..
3/05/2010 12:46p DIR Aaa
3/05/2010 12:46p DIR Bar
0 bytes in 0 files and 4 dirs
205,416,271,872 bytes free

C:\Junk\Foo>ffind /a:d /s bar*
C:\Junk\Foo\Bar

1 file

C:\Junk\Foo>ver /r

TCC 11.00.40 Windows Vista [Version 6.0.6002]
TCC Build 40 Windows Vista Build 6002 Service Pack 2
Registered to davidmarcus - 1 System License
 
I think what's happening is that, if your argument names a directory (either in the current directory, or fully qualified), then FFIND automatically appends a \* for you. So, if you have a subdirectory named FOO within the current directory, then FFIND FOO works out the same as FFIND FOO\* -- list all matching items within FOO. (BAR and AAA in your example; try it.)

Using wildcards prevents the argument from matching a specific directory name; FFIND FOO* can't search within the FOO* directory, because there is no such directory. You might not want the asterisk, since it would also match FOODPOISONING and FOOLONTHEHILL and you don't care about them. A more specific wildcard such as FO[O] or FOO[] will match only FOO and not those others -- I suspect this is what you really want.


Or maybe it's just your own darn fault for using protomatter in the Genesis matrix.
 
That does seem to explain it. Although, I don't quite see the logic of having it work that way. A note in the Help would help.
 
Back
Top
[FOX] Ultimate Translator
Translate