EmuShell 
Author Message
 EmuShell

I'm trying to write a shell in power basic to run emulators.  My idea is
for the the shell to search for all executables (the emulators) and list
the in the following manner:

1: Mame
2: SNES 9x
3: ZSNES

and so on.  The user will then enter the number (ex. 1 for Mame) and the
shell will execute another program (maybe a .pbc file) that will list
the roms associated with Mame in the same way, and this will run the
emulator and rom.  I know that the command to list files is FILES but I
need to know how to make the files appear in the list.



Thu, 04 Apr 2002 03:00:00 GMT  
 EmuShell

Quote:
> emulator and rom.  I know that the command to list files is FILES but I
> need to know how to make the files appear in the list.

If you're running a version of powerbasic that supports it, check out
the DIR$ function, which allows you to retrieve filenames one at a time.
You can then pop them into an array or a list with little effort.

Another way to do this is to SHELL "DIR >c:\tmp\xxxxoyoy.txt" or
some such, and read the results of the DOS "DIR" command from
the text file. Check into the /B switch supported by more recent
versions of DIR, which may just make things a bit easier.



Tue, 09 Apr 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 
 

 
Powered by phpBB® Forum Software