| | |
merging two txt files into one txt file
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2008
Posts: 2
Reputation:
Solved Threads: 0
VB.Net makes a task like that quite simple:
A little error checking may prevent hangups:
VB.NET Syntax (Toggle Plain Text)
Public Sub text_combine( _ ByVal path_to_read_file As String, _ ByVal path_to_append_file As String _ ) System.IO.File.AppendAllText( _ path_to_append_file, _ System.IO.File.ReadAllText(path_to_read_file) _ ) End Sub
VB.NET Syntax (Toggle Plain Text)
Public Function text_combine( _ ByVal path_to_read_file As String, _ ByVal path_to_append_file As String _ ) As Boolean If ( _ (IO.File.Exists(path_to_read_file)) _ And (IO.File.Exists(path_to_append_file)) _ ) Then Try System.IO.File.AppendAllText( _ path_to_append_file, _ System.IO.File.ReadAllText(path_to_read_file) _ ) text_combine = True Catch ex As Exception text_combine = False End Try Else text_combine = False End If End Function
![]() |
Similar Threads
- Getting size of all files in folder, and finding out some offsets.. (Python)
- merging two files and removing duplicates (Perl)
- Sorting (Java)
- Merging two files? (C)
- Sorting (Java)
- Win Min at turn off. (Viruses, Spyware and other Nasties)
Other Threads in the VB.NET Forum
- Previous Thread: combobox
- Next Thread: Listview Column data to XML file
| Thread Tools | Search this Thread |
.net .net2008 2005 2008 access account advanced array basic beginner browser button buttons center check code combo crystalreport cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic dropdownlist excel fade filter forms ftp generatetags gridview html images input insert intel internet listview map mobile monitor net number objects open panel passingparameters pdf picturebox picturebox2 port position print printing problem save searchbox searchvb.net select serial settings shutdown soap socket sqlserver survey table tcp temperature textbox timer timespan transparency trim txttoxmlconverter update user usercontol vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode year





