GWbasic problem

By janetdib ·

I have the following problem, is there anyone out there who's got the answer??

I have written an accounts program in GWbasic and have come up with the following problem.

At the end of the financial year I want to archive the years accounts to a new directory, I want to be able to enter the name of the directory in the GWbasic program, and then via a batch file, open the new directory and then write the details via a batch file to it.

Simple enough in Windows Explorer but I want an operator in the program to name it.

Anyone help please


Dennis Dibley

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

I've forgotten what GWBasic will and won't do

by neilb@uk In reply to GWbasic problem

You can certainly get the folder name into gwbasic with a simple input but I assume that the difficulty is in having gwbasic create the folder?

What you could do is have gwbasic create your accounts year-end files into a temp folder, get input for the target folder name and then have gwbasic write a batch file that can create the target folder and move the year-end into it.

You start the program from a batch file:

gwbasic.exe accounts

but have the program itself create the movefile.bat.

Neil ?

There MUST be an easier way!

Collapse -

You can make a directory from GW basic

by TonytheTiger In reply to GWbasic problem

but you're limited to DOS 8.3 names and the entire path (including the C:\) cannot exceed 64 characters.

Another way to do it would be to have your program write to a text file (named with a BAT extension, of course) probably with the PRINT# command all of the DOS commands necessary to create the new directory and copy the data files to it, then edit the batch file used to run your program to "call" the new batch file when basic exits.

Related Discussions

Related Forums