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

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.