Page 1 of 1

Nifty way to list files of a folder into a text file

PostPosted: Sun Feb 19, 2012 1:45 pm
by lcl
So, I thought to share this nifty trick I found when searching for a way to list all the wallpaper files for my lcl OS to a text file.

Open Notepad and write this:
Code: Select all
dir /b>files.txt

Save the file as a .bat -file to the folder which' contents you want to list.
Then double-click that file and it opens command prompt and closes it immediately.
After this you can find the file files.txt from your folder, with the names of all your files in that folder!

And if you want to search for just one type of files, for example .bmp -files, write:
Code: Select all
dir *.bmp /b>myBitmaps.txt

This can be very handy for someone of you as it was for me! :D

Re: Nifty way to list files of a folder into a text file

PostPosted: Mon Feb 27, 2012 7:28 pm
by Fojam
did something similar to this a while ago for my geloader app. it used a .sh file to list the files in a folder, then it loaded the main app which allowed you to choose what you wanted to load.

Re: Nifty way to list files of a folder into a text file

PostPosted: Tue Feb 28, 2012 2:16 pm
by SuperSonic
Wow lcl! This is cool! But just one thing, how could we use Ge to open the .bat file? :P

Re: Nifty way to list files of a folder into a text file

PostPosted: Tue Feb 28, 2012 5:32 pm
by lcl
We can't use GE to open the file, the user has to open it by himself :/
That's the deficiency in this thing, but I think it's still useful and I am going to use this
for lcl OS if I ever get that far on it :D

Re: Nifty way to list files of a folder into a text file

PostPosted: Wed Feb 29, 2012 12:39 am
by SuperSonic
lcl wrote:We can't use GE to open the file, the user has to open it by himself :/

Awww =/
lcl wrote:That's the deficiency in this thing, but I think it's still useful and I am going to use this
for lcl OS if I ever get that far on it :D

Awsome, I hope to see it get improved =D