VB6 i/o files - Programmers Heaven

Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

VB6 i/o files

adamwenneradamwenner Posts: 1Member
heres the deal, i need to find out how to be able to read information from one file, and write the same information out to another file, the same as running the linux command

cat file1.txt > file2.txt

taking one file and directly copying all of its contents to another file, how do you do this?

ive got both files open with these code lines
Open file1.txt For input As #intfilenumber
Open file2.txt For Output As #intfilenumber2

any help is appreciated, thanks!

Comments

  • MicroDotMicroDot Posts: 142Member
    : heres the deal, i need to find out how to be able to read information from one file, and write the same information out to another file, the same as running the linux command
    :
    : cat file1.txt > file2.txt
    :
    : taking one file and directly copying all of its contents to another file, how do you do this?
    :
    : ive got both files open with these code lines
    : Open file1.txt For input As #intfilenumber
    : Open file2.txt For Output As #intfilenumber2
    :
    : any help is appreciated, thanks!
    :

    Try the FileCopy method.

    [code]

    FileCopy "c:file1.txt", "c:file2.txt"

    [/code]


    [hr]

    [b][blue]//MicroDot[/blue][/b]

Sign In or Register to comment.