Page 1 of 1

Question about files

Posted: Wed Feb 24, 2010 12:22 am
by bongomeno
other than posts about spam, this place seems like a ghost town lately! :(
Later this week Ill try to post some updates on my GUI Dream16. :D

annnyyywaaay...

Is there any way that I can read the contents of a directory in Qbasic? Lets say that I wanted to return file names and/or info from C:\, like DIR in ms-dos. Can I do that in Qbasic by itself or do I need to use assembly?

Thanks.

Posted: Wed Feb 24, 2010 2:26 am
by burger2227
Pipe the information to a file and read that.

CHDIR to a folder path or use the path in a SHELL:

SHELL "DIR *.BAS /B > Folder.dat" ' /B returns nothing else but a list of filenames.

Ted

Posted: Wed Feb 24, 2010 6:43 pm
by moneo
burger2227 wrote:Pipe the information to a file and read that.

CHDIR to a folder path or use the path in a SHELL:

SHELL "DIR *.BAS /B > Folder.dat" ' /B returns nothing else but a list of filenames.

Ted
I know what you mean, but instead of saying "pipe", you should say "redirect."

Regards.... Moneo

Posted: Thu Feb 25, 2010 11:03 am
by bongomeno
Thanks for the reply, I will try this asap