If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!
Moderators: Pete, Mods
-
bongomeno
- Veteran
- Posts: 231
- Joined: Wed Dec 10, 2008 9:08 am
- Location: San Bernardino CA
-
Contact:
Post
by bongomeno » Wed Feb 24, 2010 12:22 am
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.
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.
-
burger2227
- Veteran
- Posts: 2446
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Post
by burger2227 » Wed Feb 24, 2010 2:26 am
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
-
moneo
- Veteran
- Posts: 451
- Joined: Tue Jun 28, 2005 7:00 pm
- Location: Mexico City, Mexico
Post
by moneo » Wed Feb 24, 2010 6:43 pm
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
-
bongomeno
- Veteran
- Posts: 231
- Joined: Wed Dec 10, 2008 9:08 am
- Location: San Bernardino CA
-
Contact:
Post
by bongomeno » Thu Feb 25, 2010 11:03 am
Thanks for the reply, I will try this asap