Text file merge

need help in merging of 4 text files into 1 text file.


@Henson_Ibon -

  1. For Each - Directory.GetFiles(yourtextfilesfolderpath, “*.txt”)

  2. IF file.exist(“output.txt”)

Then case - Append text (item to output.txt)

Else Case - write text (item to output.txt)

Hope this helps…

thanks. can you show this through coding please?



@Henson_Ibon - here you go…

StrText is the output of ReadText File activity

When the first time loop runs, Output.txt won’t be available then it will go to write text file activitity and creates the output.txt and writes the first file content. Next run, it goes to Append Line activity and appends the lines.

Hope this helps…

thank you.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.