How to read and write a text file?

text
file
activities
write
python

#1

I wanna read a text file and write it to another text file but without missing a space and alignment.

I have used a ‘Read Text File’ activity but it missed a space and alignment. It must be followed exactly.

Note: Actually Python code is need to write in another text file. So alignment and spaces are important.


#2

Hi @manoj-vkumar, will the content of the text files be the same? or are you appending to the other text file?


#3

Try using screen scraping, might work. Try the different scraping methods and see if you are close to the result! Tell me if this works :slight_smile:


#4

Not appending, just as same content. @quihan


#5

Ok., let m check with the scrapping methods… @Niket_Ghai


#6

Hi @manoj-vkumar, if the new file will have the same content. I’ll suggest using Copy File activity.

Cheers.


#7

Yeah thanks, it’s a good idea :slightly_smiling_face: @quihan .
But actually I’ve tried because I’ve to write it in some online editor panel.


#8

Hi @manoj-vkumar, in that case, you can use Get Full Text to extract the text from your file. Then use Type Into to write it in your editor. Tell me if it works :slight_smile:

Cheers.