Help - Search - Members - Calendar
Full Version: Creating A File Lister
Darkside_RG > Technical Discussions > Guides/How To > General
wheels2285
Creating a Custom File Lister

I came up with this about 2 years ago.

I was talking to my friend about how much music I had and he wanted to know which songs I had.

I told him it was way too many to list off and would take me months to type them all out. Then I got an idea and remembered basic DOS commands.


I decided to make a batch file that would execute a simple line of code upon request.

That's right. 1 line of code can list your 10,000 songs for you in less than 10 seconds without all the nonsence. I bet you are anxious on learning how to do it. Well. here it is.

1. Simply open up NOTEPAD
2. Type this into the file dir/b/on >> c:\music.txt
-- What this does it it tells the file to do a directory listing and place it on the C:\ drive and call it music.txt
-- If you are not listing music, then chang it to programs.txt. no big deal.
3. Now. Save the file as file lister.bat and make sure you change the type to all types and save it to desktop for now.
4. Your file lister is made. Simple eh. DO NOT RUN IT YET because it's on your desktop and it will just list whatever is on your desktop.
5. If you want to list all your music files. simply move this file we created into your music folder. Then you double click on it and you will see it flash on your screen and then be gone seeming like it did nothing. Well. Open up my computer and open your C:\ drive. You should find a txt file there called Music.txt or whatever you called it.
6. Open up the .txt file that is in your C:\ drive. It will show you all your music like so.

+44 - 155.wma
+44 - Baby Come On.wma
+44 - Chapter 13.wma
+44 - Cliffdiving.wma
+44 - Interlude.wma
+44 - Lillian.wma
+44 - Little Death.wma
+44 - Lycanthrope.wma
+44 - Make You Smile.wma
+44 - No, It Isn't.wma
+44 - Weatherman.wma
+44 - When Your Heart Stops Beating.wma
10 Years - Cast It Out.mp3
10 Years - Fault Line.mp3
10 Years - Frailty.mp3
10 Years - Half Life.mp3
10 Years - Insects.mp3
10 Years - Prey.mp3
10 Years - Seasons To Cycle.mp3
10 Years - Seven.mp3
10 Years - The Recipe.mp3
10 Years - Through The Iris.MP3
10 Years - Waking Up.mp3
10 Years - Wasteland.mp3
10 Years After - I'd Love To Change The World.mp3
10 Years-Empires.mp3
112 - Dance With Me.mp3
112 - Peaches N' Cream.mp3
2 Pac - Against All Odds.mp3
2 Pac - Better Dayz (feat Mr Biggs).mp3
2 Pac - Blasphemy.mp3
2 Pac - Bomb First.mp3
2 Pac - Brenda's Got A Baby.mp3
2 Pac - Catchin Feelins.mp3
2 Pac - Changed Man.mp3
2 Pac - Changes.mp3
2 Pac - Crooked Ass Nigga.mp3


and so on....

You can use this in every folder you want to list. just change the music.txt in the batch file to whatever you want.

Hope you guys all get use of this tutorial

Wheels2285
Mazuki
very nice, you could also use this to make .m3u files no?, and is it possible to do sub-directories?
jondoe88
QUOTE (Mazuki @ Nov 3 2007, 07:24 AM) *
very nice, you could also use this to make .m3u files no?, and is it possible to do sub-directories?


i dunno abt .m3u files...
but for sub directories...
jst add /s
n shud evn add /d ....so it'll come in a proper column format

basically....dis is wat d code wil b...

dir /s/d/on > c:\music.txt

n very gud idea Wheels2285 ....pretty efficient

cheers
yes_no_maybe?
If I can add a program so that you can Right Click on a folder to list files inside.

1. Choose start-my computer

2. double click C drive and then double click Program Files

3. right click an empty space in Program files, choose new-text document

4. overwrite the default name and replace with List Files.bat

5. click YES on warning

6. right click List Files.bat and choose EDIT, notepad appears with List Files.bat loaded and ready for editing

7. type this into notepad:
dir %1 /o:gn /n /-p > "%temp%\List Files.tmp"
start notepad "%temp%\List Files.tmp"

Only press enter to go to line 2

8. choose File-Exit to leave notepad

9.choose start-control panel-appearance and themes-folder options-file types

10. click File Folder then Advanced

Edit File Type box appears

11. click New

the New Action box appears

12. in the Action box type List Files then click Browse to navigate to C:\Program Files\List Files.bat, click List Files.bat, then click OK twice

in the Edit Type box you will see List Files in the action box

13. click OK one more time and close down the control panel and appearance and themes window and the List Files program is ready to use.

Test by right clicking on a folder and choosing List Files.
stylezy
thank you so much for this, i have never used DOS before and usually i have to type my lists.

EDIT: is there another bit of code that will display individual file sizes next to the file?
ie:
Alien Autopsy.avi - 699MB
Alpha Dog.avi - 701MB
American Gangster.avi - 1.35GB
stylezy
QUOTE (yes_no_maybe? @ Nov 10 2007, 04:07 PM) *
If I can add a program so that you can Right Click on a folder to list files inside.

1. Choose start-my computer

2. double click C drive and then double click Program Files

3. right click an empty space in Program files, choose new-text document

4. overwrite the default name and replace with List Files.bat

5. click YES on warning

6. right click List Files.bat and choose EDIT, notepad appears with List Files.bat loaded and ready for editing

7. type this into notepad:
dir %1 /o:gn /n /-p > "%temp%\List Files.tmp"
start notepad "%temp%\List Files.tmp"

Only press enter to go to line 2

8. choose File-Exit to leave notepad

9.choose start-control panel-appearance and themes-folder options-file types

10. click File Folder then Advanced

Edit File Type box appears

11. click New

the New Action box appears

12. in the Action box type List Files then click Browse to navigate to C:\Program Files\List Files.bat, click List Files.bat, then click OK twice

in the Edit Type box you will see List Files in the action box

13. click OK one more time and close down the control panel and appearance and themes window and the List Files program is ready to use.

Test by right clicking on a folder and choosing List Files.


ok i did this and now when i double click a folder it opens a new search window instead of just opening the folder in the same window but when i right click the folder, the "open" option isnt at the top anymore so do you know how to get it back to the top?
yes_no_maybe?
try this EBOOK for time saving techniques.
stylezy
that torrent is dead cos it only has a demonoid tracker, its ok though cos i used system restore to fix it.
thnx anyway m8.
tinyrig
Thank you for this tutorial. Tried and worked like a charm. You save me a bunch of typing.
deadone
yeah tried doing it this way a while back, nice tip tho, since then i have been using file maker, get it free from this site if any1 is interested, works perfect.
if needed i can also send you the key code to unlock to full version a013.gif

more info here
CODE
http://www.listmaker.cc/
leftboy
Neat-o guys! Had been looking for something like this!
ryry0666
try using the TREE command instead.
A1W1LL
It seems that when using the second method that my control panel is slightly different, probably because i run vista..when i get to folder options is when things diverge from the stated path..anyone know how to in vista?
unionjack
I got this one from stylezy yesterday and I cant tell you how much time its saved me from having to type out 40 + hours of mp3's for torrents!!

1. Open a Notepad (call it file lister)
2. Type dir/s/d/on > c:\music.txt (and save it)
3. Put this Notepad into whichever music file you want
4. Open the file ( this will now just flash and seem like nothing has worked but it has!)
5. Find the Notepad on c disk and thats it!

Cheers again stylezy drinks.gif
tomsutton529
QUOTE (stylezy @ Nov 10 2007, 07:42 PM) *
ok i did this and now when i double click a folder it opens a new search window instead of just opening the folder in the same window but when i right click the folder, the "open" option isnt at the top anymore so do you know how to get it back to the top?



create a new action called open, and then in the box bellow type Explorer.exe

it will open the folder as it should but it sometimes opens them in a new window.. also making the file lister so its in the menu has some flaws... i cant use it on the my documents folder, only on drives.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.