Search This Blog

Thursday, August 20, 2009

Creating a list of files within a directory

There’s been so many times where I needed to get a list of files that reside within a certain directory. There’s software out there to do it (like DDFilecatcher), but who wants to pay for it? It seems like it would be so simple just to create a little script that’ll take the names of all the files I have in a folder and save it to a .txt file. Well, here’s how you do it.

  1. Open notepad
  2. Put this code into the file

    dir /b>filelist.txt

  3. Save it as “filelist.bat”
  4. Place filelist.bat into the directory you need to get the list from
  5. Click on filelist.bat from within the folder
  6. You’ll now have a .txt doc called “filelist.txt”
  7. Simple, right? This has saved me so much time… it’s ridiculous.

    filelist



No comments:

Post a Comment