Write a simple text / HTML file

Hi @masgo

I agree with you that using the CSV Writer for writing “plain text” files feels clumsy and a specific node would be an improvement. I’ve never really understood why there isn’t one.

The CSV Writer can generally do the job, but you’ll need to ensure that it is presented with only the one column, and probably the best answer I have for using it is to set the delimiter character to something that is unlikely to appear in your output.

For example the ¬ character is hardly used, or if you are using Windows, you can “dial in” numbers using the Alt key and the numeric key pad

e.g. press and hold the Alt key and dial 0172 using the numeric keypad keys [not the regular number keys] and this will also get you the ¬ character. Alt+0169 gets ©, Alt+0223 returns ß, Alt+0222 returns Þ , Alt+8223 gives▼ and so on.

Another option on Windows is to use the “emoji keyboard” popup. Press and hold the Windows Key, and then press the period/full-stop key “.”.
(Googling tells me this is Command + Control + Space on Mac, and possibly Ctrl ; on linux)

This will bring up the emoji window,
image

and you can choose a random emoji as the delimiter!

Beyond that, make sure double quotes are set to “never”

and Write column header is turned off

In terms of a java snippet, for writing to a text file, a simple example of writing to an absolute file path can be found here:

but you also mention File System Connectors - what type of file system are you trying to connect to?

3 Likes