>> dir c:\ /b /s | find /i "n 165"
>>
>> You can also write the search results to a file:
>>
>> dir c:\ /b /s | find /i "n 165" > %temp%.\results.txt
>I understand the dir statement
>and understand the piping of the result to a file, but...
>What is that vertical line between the dir and the find do?
The vertical line is the "pipe" character. On my keyboard it is the
character above the backslash. It is sometimes drawn as a broken
vertical line.
>The find /? says that it finds a string within what is typed at the
>prompt before the find statement, but does not mention that a vertical
>line is necessary. Or, is that some kind of delimeter, or how the
>results are piped to the next, or necessary when it's all one line?
>
>Robert
The "|" character pipes the output of one command into the next
*command*. Instead of the results of the "dir" command going to the
screen (ie standard out), they are presented as input to the "find"
command. The ">" symbol "redirects" the output of a command to a
*file* or *device*.
- Franc Zabkar

Signature
Please remove one 'i' from my address when replying by email.
Robert A. Macy - 29 May 2007 15:44 GMT
> >> dir c:\ /b /s | find /i "n 165"
>
[quoted text clipped - 25 lines]
> --
> Please remove one 'i' from my address when replying by email.
Can really string quite a few together then?
Thanks for the suggestion.
It's just that since " is not allowed as a character in a filename,
it seemed that it should be able to be used in the FIND tool to define
a string. Oh, well. Thanks again for a definitive way to find the
files.
Robert
... et al. - 29 May 2007 18:08 GMT
> It's just that since " is not allowed as a character in a filename,
> it seemed that it should be able to be used in the FIND tool to define
> a string. Oh, well. Thanks again for a definitive way to find the
> files.
It can be used as you thought!
String containing space.
N 165
( But it will search for all 'N'- and all '165'-containing filenames. )
Use '"' before and after to define the string.
"N 165"
( But it will search for ONLY files named /N 165/ . )
So also use he '*' wildcard-character,
at the start and end of the defined string.
"*N 165*"
( Then it will search for what you intended. (?) )

Signature
Nah-ah. I'm staying out of this. ... Now, here's my opinion.
Please followup in the newsgroup.
E-mail address is invalid due to spam-control.
Robert A. Macy - 29 May 2007 19:07 GMT
On May 29, 10:08 am, "... et al." <l...@sig.bcause.this.is.invalid>
wrote:
> > It's just that since " is not allowed as a character in a filename,
> > it seemed that it should be able to be used in the FIND tool to define
[quoted text clipped - 21 lines]
> Please followup in the newsgroup.
> E-mail address is invalid due to spam-control.
The single search phrase
"N 165"
yields a ton of garbage, much of which I can't see why they were
listed, but...
"*N 165*"
gets EXACTLY what I want, as though I worked in DOS
Thank You!
Robert
Franc Zabkar - 29 May 2007 22:31 GMT
>> It's just that since " is not allowed as a character in a filename,
>> it seemed that it should be able to be used in the FIND tool to define
[quoted text clipped - 15 lines]
> "*N 165*"
>( Then it will search for what you intended. (?) )
Thanks for that.
With your technique in mind, the DOS version simplifies to ...
dir C:\"*N 165*" /b /s
- Franc Zabkar

Signature
Please remove one 'i' from my address when replying by email.