Createfile/Appendfile Carriage Return Help

I am having trouble with unwanted carriage returns showing up when I use createfile or appendfile. I am needing my output file to only have line feeds rather than carriage return + line feed. If I use createfile, I get a carriage return after every single line. If I use appendfile and only have %0a in my concatenation, I still end up with a carriage return after the last line of the file. I would just transfer the text (configuration) file I need but it is unique for each endpoint so I am needing to pass parameters to for each one. Is there a way to accomplish this without getting carriage returns?

Try putting in a single-line createfile…

createfile until EOF_EOF_EOF
{concatenation "%0a" of ("one";"two";"three")}EOF_EOF_EOF

Thank you for the quick reply! A bit messy to do this for a 300 line file with quotes that have to be escaped, but it does appear to be working. My only problem now is that it does not read the parameters like it is supposed to. With the entire contents of the createfile already being wrapped in the relevance curly brackets { }, the parameters aren’t working. It is reading the first " in the parameter name as the end of the string and then expects the ; to follow. I tried placing the parameter within ( ) rather than relevance brackets, but that did not work.

I removed a lot of lines for simplicity sake, but here is what I am doing:

parameter "device1" = "{(concatenation of ((preceding text of first "X" of (node values of child nodes 0 of selects "Info/Subnet" of xml document of file "C:\config\deviceinfo.xml")) ; "150"))}"

createfile until EOF_EOF_EOF
{concatenation "%0a" of ("Device Configuration";"config ip={parameter "device1"}";"config name=%22Device1%22")}EOF_EOF_EOF

I was just posting that we need to see some more of your use case :slight_smile:

You can handle a parameter inside of a relevance substitution by a string concatenation and the parameter name like so

createfile until EOF_EOF_EOF
{concatenation "%0a" of ("Device Configuration";"config ip=" & parameter "device1";"config name=%22Device1%22")}EOF_EOF_EOF

That got it! Thank you again for the help.