CSV Writer is adding blank line at the end of my file

Hey guys,
I’m stumped on this one. CSV Writer is adding a blank line/carriage return when I export TXT files using UTF-8 encoding. I’ve tried other encoding and they all do the same thing. I’ve attached screenshots of my last node before CSV Writer (and the result in Notepad). I’ve tested this by manually deleting the last line of the txt file, running it back through my workflow, and the new line gets added.

screen2

screen1

Any ideas?

Hi @siperwrx

This topic was recently brought up as well in another thread:

Maybe the solution posted there could be of use for you?

2 Likes

Definitely helpful! I’ve never used Java before. Do you know how I would replace “/path/to/file.txt” with my flow variable name? It’s running in a loop for a lot of different txt files.

Hi @siperwrx , on the left side of the Java Snippet node are a list of the available flow variables. Highlight the entire path string you want to replace, including the double quotes, and then double click on the flow variable in the left hand panel to replace that string with it.

2 Likes

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