"Tom Del Rosso" <
fizzbin...@that-google-mail-domain.com> wrote in
message news:tou4tp$1n7k3$1...@dont-email.me...
> DIR /S/B/AD C:\Tech\TEMP
>
> will look only into C:\Tech\TEMP
Yes. What you didn't tell is that that folder path actually exists. And in
that case it uses the whole path as the start from which to show all of its
subfolders - instead of searching for that particular folder, starting from
its parent
If the last part of the path doesn't exists it uses the parent as the
starting point and wil look for that folder.
And yes, that means that you can't look for subfolders with the same name as
the one you are starting with. Sorry. (at least, I don't know of any
setting.)
> and since it doesn't contain another TEMP under it like
> C:\Tech\TEMP\TEMP
>
> the output is blank.
Not quite. It tries to show you all the subfolders of "C:\Tech\TEMP". And
as there do not seem to be any it (ofcourse) returns nothing.
> I can think of kludgey ways to get around that, but is there an elegant
> way?
That fully depends on your definition of both "cludgy" and "elegant". :-)
But yes, I there is. "for /d %%a in (%1\*) do" will iterate thru all
subfolders of the one provided (in %1). You can than compare the result (in
%%a) with whatever you want. A bit of recursion (to search subfolders too)
than does the rest.
Regards,
Rudy Wieser