Results 1 to 3 of 3

Thread: Appending files in VB???

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    dayton ohio USA
    Posts
    2

    Post

    Is there a way to append files in visual basic like the DOS command Copy file1+file2+file3 outputfile?
    Is ther ANY way to append files in VB?

  2. #2
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Cleveland, Ohio
    Posts
    263

    Post

    Well, it depends what you're trying to append...

    You can append text files together if you use the Open "FILE" As... and print them all out into one file and save it.

  3. #3
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161

    Post

    Dim buffer as String
    Dim inputfilename(1 to numberofinputfiles) as String
    Open Outputfilename For Output as #1
    For i = 1 to numberofinputfiles
    Open inputfilename for Input as #i + 1
    buffer = buffer & Input(LOF(#i + 1), #i + 1)
    Close #i + 1
    Next i
    Print #1, buffer
    Close #1

    I didn't try it but I hope it works
    Razzle
    ICQ#: 31429438
    What is the difference between a raven?
    -The legs. The length is equal, especially the right one.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width