DOS in Blitz

BlitzPlus Forums/BlitzPlus Programming/DOS in Blitz

Hi you! What about using DOS-Commands in Blitzplus. How can I open a Dos-Box-Window under WinXP with blitzplus and use the commands direct out of my programm? Thanks for helping

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


Oh ho! Nice version. Somtimes old DOS is helpful. ;-)