basic dir option

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
dwilbank
Posts: 6
Joined: 10 Nov 2010 11:18

basic dir option

#1 Post by dwilbank » 16 Nov 2010 16:26

A basic dir question.

Or maybe not...?

I'm wanting to create a list of all the contents of all the subdirectories in a drive.
I want the subdirectories to list in alphabetical order, along with their files
I type this:

dir /b /s /o:n

And what I get is the subdirectories scattered in whatever order they please, while the files inside are listed in alphabetical order.

For example...
The contents of folder "Music" are listed before the contents of folder "Books"

Help?

I've tried switching the order of the switches every way possible...

amel27
Expert
Posts: 177
Joined: 04 Jun 2010 20:05
Location: Russia

Re: basic dir option

#2 Post by amel27 » 16 Nov 2010 18:02

Code: Select all

dir /b/s|sort

dwilbank
Posts: 6
Joined: 10 Nov 2010 11:18

Re: basic dir option

#3 Post by dwilbank » 16 Nov 2010 18:10

it works!

thanks!

brethallweg
Posts: 2
Joined: 22 Nov 2010 00:55

Re: basic dir option

#4 Post by brethallweg » 22 Nov 2010 01:09

i would have asked the same question but thanks. my problem is solved.



________________________


Blendtec Total Blender 

Post Reply