DOS in Blitz

BlitzPlus Forums/BlitzPlus Programming/DOS in Blitz

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You could call the command prompt yourself. In win98 it is called command.exe and usually located in c:\
In winxp, the command prompt is called 'cmd'
Maybe you could call the both?
ExecFile "cmd /c dir/b >dump.txt"
ExecFile "command /c dir/b >dump.txt"
If FileType("dump.txt") <> 1 Then RuntimeError "commands were not executed"
ff = ReadFile("dump.txt")
While Not(Eof(ff))
p$ = ReadLine(ff)
Print p$
Wend
CloseFile ff
DeleteFile "dump.txt"
WaitKey()
End