Hello,
Using 2005/.NET Framework 2.0 I want to append complete files together. Simple with dos or unix but I'm not sure of the best way to do this in VB.
For example I want to copy c:\dir1\filename1 to c:\dir2\filename1. If the file does not exist in dir2 it would be a direct copy but if the file does exist I want one file which is the two files appended together. The files always have the same names.
I have looked at My.Computer.FileSystem.WriteAllText but it appears its designed to append text from variables to the end of a file. I have also read about using this and reading the entire contents into a string and appending but surely there is a better way as my files will be quite big.
The copy / move methods just have overwrite true/false so I'm a little stumped.
If have no problem looping through directories existance checking, I just need a handle on the best method to use.
Thanks in advance.
A
Using 2005/.NET Framework 2.0 I want to append complete files together. Simple with dos or unix but I'm not sure of the best way to do this in VB.
For example I want to copy c:\dir1\filename1 to c:\dir2\filename1. If the file does not exist in dir2 it would be a direct copy but if the file does exist I want one file which is the two files appended together. The files always have the same names.
I have looked at My.Computer.FileSystem.WriteAllText but it appears its designed to append text from variables to the end of a file. I have also read about using this and reading the entire contents into a string and appending but surely there is a better way as my files will be quite big.
The copy / move methods just have overwrite true/false so I'm a little stumped.
If have no problem looping through directories existance checking, I just need a handle on the best method to use.
Thanks in advance.
A