Annette Fowler

How to save a list of files in a folder

Est. Read Time: ~Keurig Brew-Time

After looking at nearly 70,000 images for hours upon end, trying to figure how in the world I was going to figure out (this century) which files I was missing from a recent product upload, I hopefully typed the title of this entry into Google very late on  Saturday night.  Sure enough, I was thrilled to find the article “How to save a list of files in a folder” at the scarily named “Bloody Computer” blog site.

And the answer to my quandary?  From a command prompt, change to the directory that has the files you need to locate, and type:

dir /a-d /b > filelist.txt

In virtually no time, a text file is created with each file in the directory listed, which I could then easily copy/paste into Excel and find my missing files with a vlookup command.  This even works from a mapped network drive, which is exactly what I needed.  Thank you Jsanderz – whoever you are – you saved my weekend!

One Comment

  1. Posted May 18, 2011 at 8:03 am | Permalink

    Another command to get a nice graphical view of directory contents:

    tree [directory-to-list] /F > treeView.rtf

    I like using an RTF file so that it can be opened with Word, selecting DOS option and will maintain the mapping characters and can be copied into other text-editors from there.

One Trackback