Kitz Forum

Computer Software => Windows => Windows Tips & Tutorials => Topic started by: oldfogy on January 11, 2009, 09:51:45 AM

Title: How to Create a list of files within a folder or directory
Post by: oldfogy 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.

Note:
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:
Title: Re: How to Create a list of files within a folder or directory
Post by: jelv on January 15, 2009, 08:37:23 PM
You might also want to have a look at http://www.karenware.com/powertools/ptdirprn.asp