Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Listing the paths of all directories of a given name

May
3,515
5
Many of my directories have subdirectories of a specific name, e.g., BACKUP.
It may be a brain freeze, but I could not find a combination of option
switches and command parameters for DIR, FFIND or PDIR to list just the
directories named BACKUP (with full pathname), and ignore their contents.
Suggestions welcome!
--
Steve
 
Many of my directories have subdirectories of a specific name, e.g., BACKUP.
It may be a brain freeze, but I could not find a combination of option
switches and command parameters for DIR, FFIND or PDIR to list just the
directories named BACKUP (with full pathname), and ignore their contents.

Perhaps something like:
Code:
dir c:\backup[] /a:d /s /b
(The brackets make it a wildspec, without introducing the possibility of matching anything else besides BACKUP.)
 
Steve Fábián wrote:

> Many of my directories have subdirectories of a specific name, e.g., BACKUP.
> It may be a brain freeze, but I could not find a combination of option
> switches and command parameters for DIR, FFIND or PDIR to list just the
> directories named BACKUP (with full pathname), and ignore their contents.
> Suggestions welcome!
I use this to find all temp directories on all drives:
ffind /msba:d /d%@strip[ :,%_hdrives] temp[]
 
Charles Dye wrote:
| ---Quote (Originally by Steve Fabian)---
|| Many of my directories have subdirectories of a specific name, e.g.,
|| BACKUP. It may be a brain freeze, but I could not find a combination of
|| option switches and command parameters for DIR, FFIND or PDIR to list
just
|| the directories named BACKUP (with full pathname), and ignore their
|| contents.
| ---End Quote---
| Perhaps something like:
| Code:
| ---------
| dir c:\backup[] /a:d /s /b
| ---------
| (The brackets make it a wildspec, without introducing the
| possibility of matching anything else besides BACKUP.)

Thanks, it works as hoped for. I just did not think of using wildcards to
force the parser to interpret the command parameter differently, when
wildcards are not needed to specify the directory name.
--
Steve
 
dbartt wrote:
...
| I use this to find all temp directories on all drives:
| ffind /msba:d /d%@strip[ :,%_hdrives] temp[]

Thanks, the idea is the same as in Charles' - the use of a fake wildcard to
alter parser behavior. The use of @strip is ingenious!
--
Steve
 

Similar threads

Back
Top