# Error: EBUSY: resource busy or locked, rename

**URL:** <https://discourse.nodered.org/t/error-ebusy-resource-busy-or-locked-rename/39467>\
**Category:** General\
**Created:** [20 January 2021 21:32 UTC](https://discourse.nodered.org/t/error-ebusy-resource-busy-or-locked-rename/39467 "2021-01-20T21:32:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![minhhn0205](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/minhhn0205/32/29062_2.png) [@minhhn0205](https://discourse.nodered.org/u/minhhn0205)\
**Post date:** [20 January 2021 21:32 UTC](https://discourse.nodered.org/t/error-ebusy-resource-busy-or-locked-rename/39467/1 "2021-01-20T21:32:35Z")

</div>

Hi,  
I have a node red application

> Node-RED version: v1.1.3  
> Node.js version: v12.18.3

move (`fs-ops-move` node) the file from folder\_A to folder\_B after 1 minute by setting the **repetition** in the `inject` node:

 ![Error_EBUSY_resource_busy_or_locked_rename_1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/2/824ae112c5ef7e9fa227d3dd17dbef52e23d3ba7.png)

I put 27,000 files in folder\_A, after the file move is completed, there are 4 files that cannot be moved to folder\_B with the following error information:

> Error: EBUSY: resource busy or locked, rename "Z:\data\folder\_A\file\_2943.zip" -\> "Z:\data\folder\_B\file\_2943.zip"  
> Error: EBUSY: resource busy or locked, rename "Z:\data\folder\_A\file\_1546.zip" -\> "Z:\data\folder\_B\file\_1546.zip"  
> Error: EBUSY: resource busy or locked, rename "Z:\data\folder\_A\file\_0220.zip" -\> "Z:\data\folder\_B\file\_0220.zip"  
> Error: EBUSY: resource busy or locked, rename "Z:\data\folder\_A\file\_9036.zip" -\> "Z:\data\folder\_B\file\_9036.zip"

I have searched google for this error and it seems to be due to one of the following reasons:  
①Because the file is opening ➡ Before executing the file is not open  
②Because of virus software ➡ I only use Windows Defender  
③Because of npm's cache error ➡ I'm not sure

Has anyone encountered this error? Can you tell me exactly what could be the cause?  
Thank in advance!

---

<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:** [20 January 2021 21:51 UTC](https://discourse.nodered.org/t/error-ebusy-resource-busy-or-locked-rename/39467/2 "2021-01-20T21:51:47Z")

</div>

I don't have much idea what the problem may be, but a couple of questions to clarify what the problem is.

1. If you repeat the exercise is it always the same files?
2. If you run it again without restoring all files does it move the remaining four ok?
3. If the answer to 2 is that you get the same problem again then can you move them from the command line?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 March 2021 21:51 UTC](https://discourse.nodered.org/t/error-ebusy-resource-busy-or-locked-rename/39467/3 "2021-03-21T21:51:54Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
