Hi @knolleary,
I have took your advice and changed the directory location. Is there meant to be different "
in your solutions?
I had flipped the /
however, if my flow is as follows it will write to my local directory:
[{"id":"306a79fa.1dc546","type":"file","z":"e4b7c42f.224998","name":"","filename":"C:\\Users\\admin\\Documents\\Data Logged\\WaveBuoy\\{{Date().toString()}}.txt","appendNewline":true,"createDir":true,"overwriteFile":"false","x":990,"y":1300,"wires":[]},{"id":"985033d2.b4e7a","type":"csv","z":"e4b7c42f.224998","name":"","sep":",","hdrin":true,"hdrout":"","multi":"one","ret":"\\r\\n","temp":"","skip":"0","x":570,"y":1300,"wires":[["306a79fa.1dc546"]]},{"id":"fdecdcfa.c76f4","type":"function","z":"e4b7c42f.224998","name":"test","func":"var tempString = Date().toString();\nvar tempString1 = \"C:\\\\Users\\\\admin\\\\Documents\\\\Data Logged\\\\WaveBuoy\\\\\";\nvar tempString2 = tempString1.concat(tempString);\nvar finalPath = tempString2.concat(\".txt\");\nmsg.filename=finalPath;\nreturn msg;\n","outputs":1,"noerr":0,"x":390,"y":1300,"wires":[["985033d2.b4e7a"]]},{"id":"178df77e.df8839","type":"tcp in","z":"e4b7c42f.224998","name":"","server":"client","host":"xxx","port":"xxx","datamode":"stream","datatype":"utf8","newline":"","topic":"","base64":false,"x":150,"y":1300,"wires":[["fdecdcfa.c76f4"]]}]
But if my flow is this it doesn’t find the directory… Any ideas why this may be the case?
[{"id":"178df77e.df8839","type":"tcp in","z":"e4b7c42f.224998","name":"","server":"client","host":"xxx","port":"xxx","datamode":"stream","datatype":"utf8","newline":"","topic":"","base64":false,"x":150,"y":1300,"wires":[["fdecdcfa.c76f4"]]},{"id":"fdecdcfa.c76f4","type":"function","z":"e4b7c42f.224998","name":"test","func":"var tempString = Date().toString();\nvar tempString1 = \"C:\\\\Users\\\\admin\\\\Documents\\\\Data Logged\\\\WaveBuoy\\\\\";\nvar tempString2 = tempString1.concat(tempString);\nvar finalPath = tempString2.concat(\".txt\");\nmsg.filename=finalPath;\nreturn msg;\n","outputs":1,"noerr":0,"x":390,"y":1300,"wires":[["985033d2.b4e7a"]]},{"id":"985033d2.b4e7a","type":"csv","z":"e4b7c42f.224998","name":"","sep":",","hdrin":true,"hdrout":"","multi":"one","ret":"\\r\\n","temp":"","skip":"0","x":570,"y":1300,"wires":[["3d3edafb.4fa386"]]},{"id":"3d3edafb.4fa386","type":"file","z":"e4b7c42f.224998","name":"","filename":"","appendNewline":true,"createDir":false,"overwriteFile":"false","x":890,"y":720,"wires":[]}]