Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / File Lister

Author
Message
UFOs other account lol
18
Years of Service
User Offline
Joined: 3rd Jun 2005
Location: Somewhere :)
Posted: 2nd Oct 2005 16:38 Edited at: 9th Oct 2005 20:35
Here is a litttle file lister program. Copy the code into dark basic and then make a final standalone .exe. Then put it in the folder which contains the files you want to list. Then run it. It will ask you for a file name$. That is the file which the list will be written to. Next it will ask for the number of files. Right click in the folder the file is in and find the amount of files. Put that into the program. And lastly it will ask for the type of file like .bmp or .3ds. After it finishes, if you open your list file, it will list all the files in the directory that are the type you chose. This program is useul for games with a large amount of files to load. You could do something like this in your program:

Here is the file lister program:


Yes, I know, it is longer that 20 lines, but I didn't stack them. The rules say you can have 20 lines with 25 stacked commands each, which is the same as saying you can have 500 lines, and I HATE stacked code, so I just didn't.

If anyone finds a way to improve it, please tell me!
Things to improve:
-For some reason, there is a blank space after the last file, which messes up using it to load files in a different program, so you have to go into it and get rid of the extra space.

Green Bunnies rule!
UFOs other account lol
18
Years of Service
User Offline
Joined: 3rd Jun 2005
Location: Somewhere :)
Posted: 3rd Oct 2005 01:24 Edited at: 9th Oct 2005 20:35
No one cares about a stupid file lister. oh well.

Green Bunnies rule!
Darkbasic MADPSP
18
Years of Service
User Offline
Joined: 15th Jun 2005
Location: Uk
Posted: 3rd Oct 2005 21:52
It looks good mate

Gtas back and bigger and better than before
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 10th Oct 2005 19:35
You should make a complete file browser in 20 lines. Much more impressive...

Immunity and Annihalation makes Immunihalation...
UFOs other account lol
18
Years of Service
User Offline
Joined: 3rd Jun 2005
Location: Somewhere :)
Posted: 10th Oct 2005 20:45
What do you mean?

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 12th Oct 2005 02:58
Quote: "What do you mean?"


A fileselector. I just did one to see if it's possible and managed it in 15 lines!

TDK_Man

Evil stick
19
Years of Service
User Offline
Joined: 27th Mar 2005
Location:
Posted: 12th Oct 2005 22:08
Can you post it?

I ALWAYS have flame proof jacket...just in case...and a shotgun. If you want any, just ask!

We are all nice,except for that one who's name starts in a m and ends in erranvo.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 13th Oct 2005 01:04

Login to post a reply

Server time is: 2024-03-28 18:58:11
Your offset time is: 2024-03-28 18:58:11