Code: (Select All)
$Console:Only
Shell "dir c:\ > temp.txt" ' <-- this runs that shell command to DIR to get a listing of C:\, and then pipes the output to "temp.txt".
Open "temp.txt" For Input As #1
Do Until EOF(1)
Line Input #1, text$
Print text$
Loop
Give the above a try. The issue with the blank screen was you specifying "c: dir" and me just plugging it in by mistake. There's no "dir.com", "dir.exe", or "dir.bat" file in the "c:\" directory, so no file to run and thus nothing to pipe.
By *just* using the DIR command, the system looks in the various paths and finds where that command is located, and then gives you a directory listing of C:\, as specified above.
Anytime you have issues with SHELL, test your command with $CONSOLE:ONLY. Then your QB64 program will run in the console/terminal and you'll see the output before that shell window opens and closes instantly on you. It's a great way to get those error messages and determine what the heck has gone wrong.