English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

1>how to make exe files with qbasic
2> how to copy files with qbasic

2006-10-30 04:49:04 · 2 answers · asked by Pravesh 3 in Computers & Internet Programming & Design

2 answers

In order to create an executable file (.exe) from QBasic code, you need a QBasic compiler. A very popular QBasic compiler can be found here:

http://qbasic.gbgames.com/QBCompilers.htm

If you are worried about that warning, then try a site like this which has some alternative QBasic compilers:

http://www.thefreecountry.com/compilers/basic.shtml

As for copying files with QBasic, you need to use the SHELL command which will allow you to execute DOS commands from your QBasic program. For example:

SHELL copy f1$ f2$

Check out this QBasic tutorial, specifically the "FAT Commands" section:

http://library.thinkquest.org/19436/lesson5.htm

2006-10-30 05:02:38 · answer #1 · answered by Danriths V 2 · 0 0

Make sure you get the full quick basic interpreter including all the files required. Go to the Run menu and choose "make executable" depending on the type of interpreter you are using.

To copy file. You can do one of the following
DIM K AS STRING
OPEN "FILENAME" FOR INPUT AS #1
INPUT #1,K
CLOSE #1

the content of the file is loaded in a variable K.
Then write the content of K into another file

OPEN "FILENAME2" FOR OUTPUT AS #1
PRINT #1, K
CLOSE #1

If this looks problematic
Open your note pad and type...

copy FILEPATH1 FILEPATH2

save it with the extension of *.bat e.g copy.bat

Execute this file from Qbasic by typing

SHELL("COPY.BAT")

I hope you see something helpful in these

2006-10-30 05:28:26 · answer #2 · answered by Maximux 3 · 0 0

fedest.com, questions and answers