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?
Printable View
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?
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.
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