forums

TNT Basic Forums > Programming Q&A
Directory Traversing
< Last Thread     Next Thread >
Author
Thread        Post A Reply

01-27-2003 22:07

Posted by:
No Frills

Click Here to Email No Frills   Find more posts by No Frills

I'm fairly new to TNT having been a long time METAL user.

What I'm looking for, if it can be done with TNT, is code to traverse through a disk from a 'given' directory.

It should look inside every subdirectory, and if directorys exist inside sub-directorys exist inside others, look in there also.

Then the code needs to store the directory names, and filenames inside an array.

I believe it's called Traversing.

01-28-2003 22:41

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

Unless I missed a function ( and I don't think so ) you cannot do it with the code, but you can ask the user to do it for you by using AskOpenFile.

01-29-2003 23:01

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

Not currently

There is no way to do this in TNT Basic at the moment I'm afraid, you can only open files that you either know the name of, or files that are selected by the user with the 'ask open file' command.

Do you need traversing commands?

Mark

01-30-2003 12:03

Posted by:
No Frills

Click Here to Email No Frills   Find more posts by No Frills

well.... I had a nice little MP3/music player that I'd written in METAL basic.

What I was hoping to do was have it 'hunt' from a user defined directory for MP3's - so if the user gave it MP3 in the user/music directory it would then have to traverse down inside MP3 to get all the artists and album directorys etc.

It would also be handy for image viewing programs etc, so you could write a program to display every JPG/GIF they come across.

01-30-2003 17:06

Posted by:
eLL

Click Here to Email eLL   Find more posts by eLL

why?

Are you aware that TNT tacks on 2.4/.5 mb to every application
(it directly rolls the runtime/ the actual TNTBasic app into the file)?

Granted this shrinks down to about 700-800k using DropStuff v6.5 or higher, but still.

With that feature i imagine you could create some really flashy apps.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.