Hi, anyone knows how to assign the permission to node-red in order to create file on USB drive?
Is the USB drive plugged into the same computer where node red is running?
What does the built-in help of the file node say about Windows paths?
yup, the USB drive plugged into the same computer
and I'm trying to write a file to H:\ path
but the debug message said unable to create the directory due to denied of operation
Yeah but under the hood, without escaping backslashes, a file name of h:data.json
is trying to be created - which is NOT permitted on windows.
You didnt say but I assume you are now using h:\\data.json
or even better, h:/data.json
?
So don't you need to make it:
H:\\data.json
?
Screenshots sometimes are painful to read.
Now I figured out why
there's a checkbox in the write file node ("Create directory if it doesn't exist?")
if we just need to write file to H:/ drive, then we need to unselect this checkbox otherwise system will prompt out the error
for instance:
h:/data.json => get error
h:/newFolder/data.json => success to write file
it's quite weird but now the problem has been solved, I am able to create the file now :))
actually the below syntax work for me:
- H:\\data..json
- H:\data.json
- H:/data.json
just remember to unselect the "create new directory" checkbox in the write file node
otherwise system will throw error
Please look a bit more at the text from @Steve-Mcl ....
On Windows path separators may need to be escaped for example \\Users\\myUser
Please note the double \\
.
ok sure
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.