Annoyances.org
Home » Windows 95 Discussion Forum » Message 1181523846 » Entire Thread Search | Help | Home
  
redirect I/O for QB ?
Showing all messages in thread #1181523846
Windows 95 Annoyances Discussion Forum


The following are all of the messages in this thread (3 in all), shown in chronological order. Click any message subject to view that message by itself or to view the thread hierarchy.
redirect I/O for QB ?
Sunday, June 10, 2007 at 6:04 pm
Posted by geek9pm (179 messages posted)

Ok, this is not really a Windows 95 question, but I think this is the best place to ask. MS had a QBASIC version called just QB that ran in DOS and still runs pretty good even in recent versions of Windows. But it does not do long file names. So here is my question.
I recall reading that you can do I/O redirection with QB if you OPEN the console as a file. But I do not remember what the name of the console was. It was something like "CON" or "SCR" or something other that a real file.
Does anybody remember?

Geek9pm

[Reply or follow-up to this message]

re: redirect I/O for QB ?
Sunday, June 10, 2007 at 10:42 pm
Posted by Jerry (875 messages posted)

Hi Geek:

Take a look at this and see if it helps.

http://www.computerhope.com/issues/ch000398.htm

I was surprised to find that COPY CON still works
in the DOS that lies under Win95.

If you want to work with Long File Names at the
DOS level, here are some tools:

http://sta.c64.org/lfnemu.html

My favorite is "Odi's LFN Tools".

Jerry

[Reply or follow-up to this message]

re: redirect I/O for QB ?
Tuesday, June 12, 2007 at 3:08 pm
Posted by Jacob6601 (1659 messages posted)

I'm not sure exactly what you are trying to do, but the simplest way I've found to 
manipulate LFNs is by reverting back to the DOS prompt via batch files and using 
double quotes around the filename. For example, CD "C:\Program Files" will work. 
However, you must be running windows for this to work -- even safe mode does not 
support LFNs (98 and later not tested).

These commands are probably older than your version: You probably need to adjust 
the actual commands/syntax.

REM *******************************************************************
This is the command for calling a batch file from a Qbasic routine.
REM *******************************************************************

540 SHELL "C:\DOS\BASIC\LEWPREST\LEWPBACK.BAT"

REM *******************************************************************
REM This is the basic command structure for calling a Qbasic routine
REM from a batch file. The most important aspects are the /RUN switch
REM before the actual program name and having a SYSTEM command at the
REM end of the basic program.
REM *******************************************************************

D:\DOS\Dos6\Qbasic.exe /RUN D:\System\Batch\Backup\A.bas

[Reply or follow-up to this message]

Tip: Use one of the [Reply or follow-up to this message] links above to add a message to this thread
Return to the Windows 95 Discussion Forum

All content at Annoyances.org is Copyright © 1995-2008 Creative Elementtm All rights reserved.
Please do not plagiarize; redistributing these pages without permission is strictly prohibited.