Copy and move files using node-red-contrib-filesystem

Hello, I'm new to Node-Red and I'm looking for help on how to move a file from an N:\ drive to C:\image folder. However I get and error TypeError: The "path" argument must be of type string. Received undefined.
I plan on reviewing the NR guide working with messages again.
Thank you in advance....

Use a debug node parallel to the file node to show the path string and post it here.

There is also something in the settings file.

The httpStatic part.

I am not going to pretend to know EXACTLY how it works, but I am sure others will be ale to help.

When using Windows paths, the \ character can be an issue as it is an "escape" character in JavaScript strings. Windows always lets you use / instead though so try that to see if it helps. Some of the core nodes already allow for this and work with \ but contributed nodes may not.

1 Like

Coping “N:\test.jpg” failed: ENOENT: no such file or directory, copyfile 'N:\test.jpg' -> 'C:\image\2025-12-09T11:50:30.874Z'

As suggested, use forward slashes not backslashes.

Thank you for the suggestions. I changed to forward slashes in the node, but still getting the same error. However, if I change the the Dest Fname to a string it works, and copies the file to the target location.

Coping “N:\test.jpg” failed: ENOENT: no such file or directory, copyfile 'N:\test.jpg' -> 'C:\image\2025-12-09T12:41:19.338Z'

However, this works

Unfortunately it appears that the node has not got a github repository. It does have a gitlab repository but issues are not enabled so you cannot submit a bug report on the node.

Personally I will not use nodes that do not have a github repository with issues enabled, unless there is absolutely no alternative.

1 Like

Thank you for the comments. I should have mentioned, I'm looking for a way to copy and rename a file with a time stamp. If there are othet methods It would be nice to know.
Thank you

I have used node-red-contrib-fs-ops (node) - Node-RED which is quite old but still seems to work fine. For me at least.

I also use node-red-contrib-fs (node) - Node-RED for directory listings, but I can't remember why I use that rather than the dir node in the first package.

Me too. It has a very good, well thought out, modular design for processing file-by-file (and has other useful things like a node for checking file access etc)

+1 from me

Because you like me so much?! :rofl:

To be fair, I've really not had time to work on that package for a long time. It is on my long-list for a major rework. Sadly, that list IS rather long. :frowning:

Apart from that I think it is the fact that it has good options for subfolder recursion, which fs-ops does not, if I remember correctly.

Well, if you think of other features that aren't being handled, let me know - maybe it will prompt me to do a much needed update.

At the moment all it does is directory listings. The readme mentions a Copy node but that is not there. On the other hand I think fs-ops handles that ok so there are probably more important things to be doing.

1 Like