Hi All... I am using this code to combine text files. How can I add a carriage return after each file?
I need this output:
Not like this code is doing:
I need this output:
Code:
Apple
Banana
Orange
Code:
AppleBananaOrange
Code:
Imports System.IO
Imports System.Text
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim newDateFormat As String
newDateFormat = DateTime.Now.ToString("MM.dd.yyyy_mm.HH.ss")
Dim prgPath As String = IO.Path.GetDirectoryName(Application.ExecutablePath)
Dim Paths() As String = Directory.GetFiles(prgPath, "*.txt")
For Each Path As String In Paths
File.AppendAllText("Combined_" & newDateFormat & ".txt", File.ReadAllText(Path), Encoding.Default)
Next
End Sub
End Class