Sunday, February 19, 2017

windows 7 - List files in CMD with DIR


I'm trying to use DIR to list all files in the current directory and sub directories ordered alphabetically. I only care about the filepath and name. I don't want the size, counts, etc. Here's what I have but it's just too details:


dir/on/s/w/a-d > __files.txt

This outputs something like (obfuscated):


 Volume in drive Q is ********
Volume Serial Number is ****-****
Directory of Q:\****
__files.txt __listallfileswithoutput.bat
2 File(s) 28 bytes
Directory of Q:\****\*
*** ****.*** ******.*** ** **** ******.***
** **** ** ******.***
4 File(s) 4,288,735,526 bytes
Directory of Q:\****\*
*********.***
...

I just want:


Q:\****\*\*** ****.***
Q:\****\*\******.***
Q:\****\*\** **** ******.***
Q:\****\*\** **** ** ******.***
Q:\****\*\*********.***

Can this be done with DIR alone? If not, how can it be done?


Answer



Is the output of dir/on/s/a-d/b > __files.txt what you expect?


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...