July 11th, 2009
ddfilecatcher
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.
- Open notepad
- Put this code into the file
dir /b>filelist.txt
- Save it as “filelist.bat”
- Place filelist.bat into the directory you need to get the list from
- Click on filelist.bat from within the folder
- You’ll now have a .txt doc called “filelist.txt”
Simple, right? This has saved me so much time… it’s ridiculous.
Popularity: 4% [?]



Comments
You can also just skip the .bat file and dump in the command line…
dir >files.txt (all files/folders/etc)
dir /ad >dirs.txt (all directories into file called dirs.txt)
dir *.doc >doc.txt (all files ending in .doc)
etc…
dir (conditions) >filename.ext
Tully
July 13th, 2009
This is so simple yet so useful!
Thanks for the tip.
Lot’s of times I needed to do it
Ahmad Alfy
July 26th, 2009
But it works well with Roman languages only.. For Russian, for example (where 1 letter is 2 bits), it’s not good at all.
slaFFik
November 23rd, 2009