' Concatenate a variable number of text files into a single result file'' Params:' - resultFile: the complete path of the result file you want to create' - header: a string that is written when a file is added to the result file.' Note: this string can contain the #FilePath# tag that will be replaced ' with the path of the file being added' - sourceFiles: the sequence of files whose content will be concatenated'' Example:' ConcatenateFiles ("D:
es.txt", "------ NEW FILE: #FilePath# ------",' "D:1.txt", "D:2.txt", "D:3.txt")Sub ConcatenateFiles(ByVal resultFile As String, ByVal header As String, _ ByVal ParamArray sourceFiles() As String) Dim writer As System.IO.StreamWriter Dim reader As System.IO.StreamReader Try writer = New System.IO.StreamWriter(resultFile, True) Dim fpath As String For Each fpath In sourceFiles ' write the header string, with #FilePath# replaced with ' the path of the source file being processed writer.WriteLine(header.Replace("#FilePath#", fpath)) Try ' open the source file in read mode reader = New System.IO.StreamReader(fpath) ' append all the content of the current file in the destination ' file writer.Write(reader.ReadToEnd() & Environment.NewLine) Finally If Not reader Is Nothing Then reader.Close() reader = Nothing End If End Try Next Finally ' close the writer stream If Not writer Is Nothing Then writer.Close() End TryEnd Sub


Westinghouse Builds Polish Power Plant
Westinghouse Electric Company and Bechtel have come together to establish a formal partnership in order to design and construct Poland’s inaugural nuclear power plant at