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

**URL:** https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896
**Category:** General
**Created:** [8 December 2025 21:44 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896 "2025-12-08T21:44:37Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Triman5](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@Triman5](https://discourse.nodered.org/u/Triman5)
#### Post date: [8 December 2025 21:44 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/1 "2025-12-08T21:44:37Z")

</div>

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....

---

<div class="post-metadata">

### Author: ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)
#### Post date: [9 December 2025 04:47 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/2 "2025-12-09T04:47:08Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [9 December 2025 08:32 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/3 "2025-12-09T08:32:59Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [9 December 2025 08:56 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/4 "2025-12-09T08:56:44Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Triman5](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@Triman5](https://discourse.nodered.org/u/Triman5)
#### Post date: [9 December 2025 11:53 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/5 "2025-12-09T11:53:04Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [9 December 2025 12:08 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/6 "2025-12-09T12:08:13Z")

</div>

As suggested, use forward slashes not backslashes.

---

<div class="post-metadata">

### Author: ![Triman5](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@Triman5](https://discourse.nodered.org/u/Triman5)
#### Post date: [9 December 2025 12:45 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/7 "2025-12-09T12:45:04Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Triman5](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@Triman5](https://discourse.nodered.org/u/Triman5)
#### Post date: [9 December 2025 12:45 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/8 "2025-12-09T12:45:27Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/3/7372d89b36cf4e2cc133065be284ee46dd86b400.png)

---

<div class="post-metadata">

### Author: ![Triman5](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@Triman5](https://discourse.nodered.org/u/Triman5)
#### Post date: [9 December 2025 12:46 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/9 "2025-12-09T12:46:00Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Triman5](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@Triman5](https://discourse.nodered.org/u/Triman5)
#### Post date: [9 December 2025 12:48 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/10 "2025-12-09T12:48:10Z")

</div>

However, this works

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/6/f698f79eaf38db4fea46bdd1742e95e7384a9bc2.png)

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [9 December 2025 13:19 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/11 "2025-12-09T13:19:35Z")

</div>

Unfortunately it appears that the node has not got a github repository. It does have a [gitlab repository](https://gitlab.com/advantech-czech/node-red-contrib-filesystem) 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.

---

<div class="post-metadata">

### Author: ![Triman5](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@Triman5](https://discourse.nodered.org/u/Triman5)
#### Post date: [9 December 2025 13:48 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/12 "2025-12-09T13:48:51Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [9 December 2025 14:10 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/13 "2025-12-09T14:10:15Z")

</div>

I have used [node-red-contrib-fs-ops (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-fs-ops) which is quite old but still seems to work fine. For me at least.

I also use [node-red-contrib-fs (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-fs) for directory listings, but I can't remember why I use that rather than the dir node in the first package.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [9 December 2025 14:18 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/14 "2025-12-09T14:18:35Z")

</div>

> [@Colin](#):
>
> I have used [node-red-contrib-fs-ops (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-fs-ops) which is quite old but still seems to work fine. For me at least.

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

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [9 December 2025 15:36 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/15 "2025-12-09T15:36:51Z")

</div>

> [@Colin](#):
>
> I also use [node-red-contrib-fs (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-fs) for directory listings, but I can't remember why I use that rather than the dir node in the first package.

Because you like me so much?! 🤣

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. ☹

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [9 December 2025 16:01 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/16 "2025-12-09T16:01:06Z")

</div>

> [@TotallyInformation](#):
>
> Because you like me so much?

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.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [9 December 2025 16:14 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/17 "2025-12-09T16:14:52Z")

</div>

> [@Colin](#):
>
> 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.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [9 December 2025 16:34 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/18 "2025-12-09T16:34:35Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![RvG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rvg/32/96613_2.png) [@RvG](https://discourse.nodered.org/u/RvG)
#### Post date: [10 December 2025 14:01 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/19 "2025-12-10T14:01:30Z")

</div>

The company I work for created a new set of files and folder handling nodes: [node-red-contrib-files-and-folders (node) - Node-RED](https://flows.nodered.org/node/@objectif-lune/node-red-contrib-files-and-folders) . Maybe that is of interest.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [10 December 2025 14:31 UTC](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896/20 "2025-12-10T14:31:05Z")

</div>

I am getting a 404 accessing the source repository linked from the npm page.  
Is a reason it is not hosted on github?

[Next page](https://discourse.nodered.org/t/copy-and-move-files-using-node-red-contrib-filesystem/99896.md?page=2)
