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

You must understand the Game Editor concepts, before post here.

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

Postby lcl » Sun Feb 19, 2012 1:45 pm

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
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

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

Postby Fojam » Mon Feb 27, 2012 7:28 pm

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.
Attachments
geloader iPhone.zip
(1.09 MiB) Downloaded 135 times
CLICK TO GIVE ME POINTS

My Latest Projects:
Super Smash Bros: viewtopic.php?f=6&t=12307 PLEASE help by making sprites!
User avatar
Fojam
 
Posts: 513
Joined: Thu Mar 19, 2009 10:02 pm
Location: under your bed!!!
Score: 69 Give a positive score

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

Postby SuperSonic » Tue Feb 28, 2012 2:16 pm

Wow lcl! This is cool! But just one thing, how could we use Ge to open the .bat file? :P
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

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

Postby lcl » Tue Feb 28, 2012 5:32 pm

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
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

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

Postby SuperSonic » Wed Feb 29, 2012 12:39 am

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
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest

cron