Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
   Compare ISP   Rate your ISP
Please login or register.

Login with username, password and session length
Advanced search  


Author Topic: How to Create a list of files within a folder or directory  (Read 11994 times)


  • Helpful
  • Kitizen
  • *
  • Posts: 3568
  • If it ain't broke....... I'll soon fix it.
How to Create a list of files within a folder or directory
« on: January 11, 2009, 09:51:45 AM »

How to Create a list of files within a folder or directory.

The easy way of creating a list of all files within a folder is quite easy.
Make a batch (.bat) file, a dos command to make listing of contents of folder or directory.

Copy and paste this exactly as it is into notepad.

dir /b /o:en > dir.txt

then save it as a .bat file with a name like say: My File List.bat

If you need to, now place the "My File List.bat" file into the folder or directory you want to make a listing of, then double click it, at this point the screen will go blank just for a few seconds and you will then see a new file made called 1_Directory.txt in the folder or directory.
Just click it to open and it will show a list all the files in that folder or directory.

The original .txt file should only contain the single line of text of "dir /b /o:en > 1_Directory.txt"
When you have made your first .bat file, you can simply copy it to any folder/s you want to.
To update the list if you have added or removed files, simply double click the .bat file again.
I chose the name 1_Directory, because with a 1 (One) at the start it is always at the top of the list.
You can chose to change the name, but there must be no gaps in the name, so use a dash or underscore as above.

Keep a copy in your backup folder so you've always got it
This works for XP, if it doesn't work for Vista, you could always upgrade to XP. :thumbs:


  • Helpful
  • Reg Member
  • *
  • Posts: 847
Re: How to Create a list of files within a folder or directory
« Reply #1 on: January 15, 2009, 08:37:23 PM »

You might also want to have a look at
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Rick Cook, The Wizardry Compiled