List all the files in a windows directory

Ever wanted to list all the files in a directory tree – I tend to find this useful when checking if there’s anything in a mass of automatically generated directories

Use this command:

dir /S /A:-D /B

Here’s what the switches mean:

/S
Look in all subdirectories
/A:-D
Don’t show subdirectories in the list of files
/B
Bare Format. Just shows the path, no extra information

Leave a Reply

Your email address will not be published. Required fields are marked *