Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

copying files and programs

y2keabley2keable Member Posts: 23 ✭✭
i have made a program with a setup file and put them on a floppy.
What I want to know is how to make the setup file act like a setup file by copying the program on the floppy to the C drive.

i already know hot to copy the simple files made by the OPEN command:

open filename$ for input as #1 'copy from
open filename$ for output as #2 'copy to
do while not eof(1)
input #1, copying$
print #2, copying$
loop
print "Done"

This dose not work however for a comieled .exe file.
can someone please help me?

cheers
Jayson Keable

Comments

  • mstechcamstechca Member Posts: 64

    Use binary mode. like this:
    -----------------------------
    open file1$ for binary as #1
    open file2$ for binary as #2
    do until loc(1) >= lof(1)
    dat$=input$(buffer%,1)
    put #2,,dat$
    loop
    close #1,#2
    -----------------------------
    file1$ is the input file, and file2$ is the output file.
    buffer% is the amount of data being copied at once. the higher the value, the better. If you go over 11050, then you may experience "out of data space" problems.


    email: mstechcae@webcity.ca

  • y2keabley2keable Member Posts: 23 ✭✭
    :
    : Use binary mode. like this:
    : -----------------------------
    : open file1$ for binary as #1
    : open file2$ for binary as #2
    : do until loc(1) >= lof(1)
    : dat$=input$(buffer%,1)
    : put #2,,dat$
    : loop
    : close #1,#2
    : -----------------------------
    : file1$ is the input file, and file2$ is the output file.
    : buffer% is the amount of data being copied at once. the higher the value, the better. If you go over 11050, then you may experience "out of data space" problems.
    :
    :
    : email: mstechcae@webcity.ca
    :
    :
    this works for files but wat about .exe programes created in QBASIC?
  • Folker FritzFolker Fritz Member Posts: 19
    : this works for files but wat about .exe programes created in QBASIC?


    .exe programs are files too so you can copy then as usual or what is the problem that you have or why doesn't it work for them? please tell me why do you think that it shouldn't work for them.
Sign In or Register to comment.