Howdy, Stranger!

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

Categories

File Copying, OS Version, and BIOS ???

Hi all! Here's a pretty big order!


1.) Does anyone know how to COPY a file in MS QuickBASIC 4.5? I don't want to move a file (like

the NAME command will do), I just want to COPY

it. I've tried opening it as BINARY, then writing the

contents to another file, but I couldn't get that to

work.


2.) Is there a way to get the Version number of the

operating system without using the SHELL

command? SHELL runs COMMAND.COM, which

returns DOS Version 5.00.5.00 under Windows NT 4.0.


3.) Is there a way to read the BIOS in QuickBasic?

specifically, the manufacturer, date, revision

number, and OEM?


Any help would be GREATLY appreciated! Thanks

in advance!


Paul


Comments

  • : Hi all! Here's a pretty big order!


    : 1.) Does anyone know how to COPY a file in MS QuickBASIC 4.5? I don't want to move a file (like

    : the NAME command will do), I just want to COPY

    : it. I've tried opening it as BINARY, then writing the

    : contents to another file, but I couldn't get that to

    : work.


    I'll just answer question 1)


    You can copy a file in QuickBasic using 2 ways.

    1) shell "copy ... ..."

    2) By opening it in binary (As you said you did but didn't succeed.) Anyway here is the way, it has worked for me.


    ; I could only make it work this way. I had problems when I was using a simple string variable, so I used a one byte string variable, and it worked...


    DIM byte AS STRING * 1

    OPEN SrcFile$ FOR BINARY AS #1

    OPEN DestFile$ FOR BINARY AS #2


    FOR I% = 1 TO LOF(1) ; LOF(n) gives the Length Of File #n

    GET #1, I%, byte

    PUT #2, I%, byte

    next i%


    CLOSE


    That's it... easy ha? :-)

    But I worn you... this is relatively slow...


    Hope I helped...






    URL:http://users.otenet.gr/k/katsiapi/hapiflou

Sign In or Register to comment.