cancel
Showing results for 
Search instead for 
Did you mean: 

Remove CRLF from the text file

groverarena
New Contributor

Hi,
What should I add to this to remove CR and LF while generating a text file using File Writer .

“Test/Hello_”+ Date.now().toLocaleDateString(‘{“format”:“MMM”}’).toUpperCase()+Date.now().toLocaleDateString(‘{“format”:“YYYY”}’)+“.txt”

9 REPLIES 9

Supratim
Contributor III

@groverarena Not sure how did you get CR and LF here. You can use ‘Test/Hello_’+Date.now().toLocaleDateTimeString({format: “MMMYYYY”}).toUpperCase()+‘.txt’ to minimize your query.

@Supratim, I didn’t understand your response. I am talking about removing Carriage Return and Line Feeds from the text file. The above query is working fine

Ok. Then try this-
$content.replaceAll(‘\r\n’, ‘’)

Where do I add this in my pipeline?
image