Issue with Text Data

As part of my automation process, I’ve built a workflow where I’m writing data to a Notepad file.

However, I’ve noticed that each time I write new text to the file, the previous data gets overwritten and removed.

I’m not sure why this is happening, and I’d appreciate your help in understanding the issue and how to resolve it."

Hi @Honey_Kataria ,

It seems that u are using write text file
Which will clear instead use appendline
Which will add data to ur existing data
. This will help resolve ur issue

2 Likes

Hi @Honey_Kataria,

I am assuming you are using the write text file activity to write data to a notepad file, the activity overwrites any existing data in the file. You can use the Append Line activity, this will append the text to the next line of your notepad file.

Hope this helps! :grinning:

1 Like

Hi @Honey_Kataria

There are 2 approaches which you can follow to handle the same

First - You can use the Append Text activity this will add new text to the end of the existing content without deleting it

Second - Read the existing content from the Notepad file using the Read Text File activity store the content in a String variable.
Use assign activity and concatenate the old text with the new text

FinalText = ExistingText + Environment.NewLine + NewText

Then use the Write Text File activity this will write both the old and new data together to the file.

1 Like

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