01-31-2024, 11:08 PM
(01-31-2024, 11:48 AM)SMcNeill Wrote: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.
Ah, purrfic! Great work... short and sweet.

Thanks again to all.
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.) 
Please visit my Website at: http://oldendayskids.blogspot.com/

Please visit my Website at: http://oldendayskids.blogspot.com/