question about the Dos prompt ?


option nolet
LIBRARY "C:\Program Files (x86)\TrueBASIC GOLD v6\TBLibs\ExecLib.Trc"
set directory "c:\"
CHAIN "!C:\Windows\System32\cmd.exe ****",return
CALL Exec_AskDir(dir$)

In the above program find some *** what commands you can place here.

If I want open simple text file on the dos prompt that is in the ( C:\ directory)

Best regards




The above from a simple Google search:

Note: Windows 8 does not necessarily use DOS commands so you might need to check out command line input for Windows 8 if you are running that although what you want to do works in Windows 8 just fine.

Anyway..mostly you would use 'dir' to list directory contents and 'cd dirname' to move through directories. Then if you find a text file you want to read just type in the name of the file at the prompt. I just used the program above to open the command line window, moved through about 10 directories first using >dir to show me what was in the current directory, then >cd dirname to move to a subdirectory and finally >filename.txt to read a text file. In my Windows 8 setup, this opened NOTEPAD to actually display the file.