firdouss.com

How To: Generate List of Files in a Folder Quickly

Often, I find myself making new contacts, and throughout the discussion, we might be deciding to exchange music, attempting to listen to new genre of tunes and potentially discover something that I like. However it gets quite troublesome when the other party goes like “Hey tell me what you have in your music folder?” and I scratched my head, because it is near 80GB big, plus it’s no where near organized.

What I did is run a small batch file, which will generate a file containing the entire folder’s worth of music that I can send over to anyone so they can pick any files they want. To do this, it’s very simple.

Step 1: Create the script.

Open up Notepad, and paste the following lines into it:

@echo off
dir /s > list.txt

Save this file as listall.cmd (well that’s what I call them. Feel free to name yours killthepoorkitty.cmd if you want, as long as the extension ends in *.cmd).

Step 2: Copy this file into the root folder that you want to list the files in (this script will also list down the contents of the subfolders). For example, my music folder is located in D:\Music, so I shall put it in this folder.

Step 3: Double-click on this file. A command prompt window will open, and then go away. Once this is done, you’ll notice that there’s a new file called “list.txt” in the folder you run this script. This file contains the listing of the files in that folder, something like this:

There you have it! Oh and before I forgot, this is meant to work with Windows.

You can also download this file in case you’re too lazy to every copy and paste!

Related Posts with Thumbnails
Share |

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

10 Comments

  • Orang Jahat says:

    For the love of God.. this is so darn helpful!

    thanks bro!

  • Silencers says:

    A few months ago I installed his batch file. I dunno what I did wrong, but it turns out if I double click a folder it opens in a new window – unless I enable the Folder tree view in Explorer.

    After accumulating several other issues [Photoshop fail, Windows fail etc] I formatted. LOL.

  • Silencers says:

    Actually because I edited the wrong Registry file or something. I can’t remember what, nor do I remember how to fix it. So yeah, heheh.

  • Pingback:
    GENSHIKEN - UNIKL CITY CAMPUS says:

    [...] to learn how to do Directory Listings onto a single textfile? thanks to Fird, and his guide on his personal [...]

  • flo says:

    Thanks, really useful guide.

  • Crystal says:

    Awesome.
    Saved me the trouble of the long way of looking up some article or another on google with the instructions, and then typing out all the commands in cmd…not to mention misstyping something and having near heart failure that I might have done serious damage in my accidentally putting in a wrong command…
    Oh well…
    I wish I were a geek. :(
    I’m artistically inclined… just not computer geeky enough…
    …yet.
    Thanks! The script worked like a charm…
    !~LONG LIVE SMART HELPFUL PEOPLE~!
    !~~HUZZAH~~!
    !~~~FIRD~~~!
    !~~HUZZAH~~!
    (3 cheers)

  • Rafaqat says:

    dude ur just awsome ………. saved ma day …………. i was considering copying each files name induvidually ………..lol

    thanks gawd i googled ma problem b4 actually doing that

    thanks again mate

  • Jon mathew says:

    how to generate only file names, it shows full path like directory name, filesize, etc…

  • Fird says:

    That’s odd. A batch file with just a dir and redirect shouldn’t cause such.

    Anyway I had that issues too back then. I ended up doing the same thing LOL

  • Fird says:

    One tip : next time you’re butchering the Registry, add a bookmark (favorite) to the point where you’re butchering. Doing this have saved me countless times after a tweaking gone bad!

Post Your Comment!