• Hey Guest. Check out your NeoGAF Wrapped 2025 results here!

the DOS dir command - need a uick bit of help

Status
Not open for further replies.

Ecrofirt

Member
Is there anyway to get a dir list of all folders and subfolders inside a folder?

For example, c:\music is the folder i'd want to dir. But, this folder has the Metallica in it, and inside Metallica, is a folder for each of their albums.

Is there any way to do a dir command in c:\music that will return all folders and subfolders in c?

I would need it in a layout somehow similiar to this

C:\Music>dir /b
Metalica
>Kill Em All
>Ride The Lightning
Ozzy Osbourne
>Blizzard of Ozz
>No More Tears

is anything like this possible? I'd prefer to use /b so it's all in bare-bones format, and I'd > it to a file as well.
 
FYI, if you ever need help with a dos command, you can just type <command> /? for options for it.

so "dir /?" will show you every dir command there is.
 
ok, well that got me off to a good start. thanks!

I'm using dir /A:d /s /b>files.txt

FYI, if you ever need help with a dos command, you can just type <command> /? for options for it.

so "dir /?" will show you every dir command there is.

I know that, but I missed the A one, somehow.

OK, problem with doing it the wat I listed above is that here's some sample output:
F:\music\Avantasia
F:\music\Ayreon

whereas I would just want it to say
Avantasia
Ayreon

Can I do that?
 
I'm getting output like this:
F:\music\Avantasia
F:\music\Ayreon
F:\music\Avantasia\Avantasia - [2001] - The Metal Opera
F:\music\Avantasia\Avantasia - [2002] - The Metal Opera Part 2
F:\music\Ayreon\Ayreon - [1995] - The Final Experiment
F:\music\Ayreon\Ayreon - [1996] - Actual Fantasy
F:\music\Ayreon\Ayreon - [2004] - The Human Equation

Which I'll go through and change if I have to, but is there any way I can have it look similiar to thisL
Avantasia
>Avantasia - [2001] - The Metal Opera
>Avantasia - [2002] - The Metal Opera Part 2
Aryeon
>Ayreon - [1995] - The Final Experiment
>Ayreon - [1996] - Actual Fantasy
>Ayreon - [2004] - The Human Equation

?

dir a* /a:d /s /b

Give it a shot?
same thing
 
Ecrofirt said:
same thing

Try "dir /b /s *." (no quotes, obviously).


It will exclude every file because, presumably, every file has an extension. The directories will still be listed in the search.
 
xsarien said:
Try "dir /b /s *." (no quotes, obviously).


It will exclude every file because, presumably, every file has an extension. The directories will still be listed in the search.

Good suggestion, but that doesn't work either. It also seems to exclude some of my folders, oddly enough.

I guess there's no way to do this easily
 
don't use dir for that
just type in tree
Code:
tree - This would list a tree listing of the current drive.
Below is a basic example of what a directory may look like.
C:.
&#9500;&#9472;&#9472;&#9472;Common
&#9500;&#9472;&#9472;&#9472;Director
&#9500;&#9472;&#9472;&#9472;Flash
&#9500;&#9472;&#9472;&#9472;Shockwave 8
&#9474; &#9500;&#9472;&#9472;&#9472;DswMedia
&#9474; &#9500;&#9472;&#9472;&#9472;Prefs
&#9474; &#9492;&#9472;&#9472;&#9472;Xtras
&#9492;&#9472;&#9472;&#9472;update
 
Status
Not open for further replies.
Top Bottom