# Loading MRB file Leads to Creation of Temporary File that Cannot be Deleted

**URL:** <https://discourse.slicer.org/t/loading-mrb-file-leads-to-creation-of-temporary-file-that-cannot-be-deleted/37363>\
**Category:** Support\
**Created:** [July 13, 2024, 9:19pm UTC](https://discourse.slicer.org/t/loading-mrb-file-leads-to-creation-of-temporary-file-that-cannot-be-deleted/37363 "2024-07-13T21:19:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![edwardwang1](https://avatars.discourse-cdn.com/v4/letter/e/858c86/32.png) [@edwardwang1](https://discourse.slicer.org/u/edwardwang1)\
**Post date:** [July 13, 2024, 9:19pm UTC](https://discourse.slicer.org/t/loading-mrb-file-leads-to-creation-of-temporary-file-that-cannot-be-deleted/37363/1 "2024-07-13T21:19:26Z")

</div>

Hi all,

I have encountered a bug that I haven’t seen in my many years using Slicer. I was given a .mrb file from a colleague. While Slicer is able to load the MRB correctly, it also reports the error below.

`Loading C:/Users/Edward/Desktop/UnionML/MRBsOriginal2024/165.mrb - vtkMRMLScene::ReadFromMRB failed: cannot remove directory 'C:/Users/Edward/AppData/Local/slicer.org/Slicer/cache/SlicerIO/__BundleLoadTemp-2024-07-13_165652_79'\n`

Upon investigation, it appears that Slicer is creating temporary files in `\AppData\Local\slicer.org\Slicer\cache\SlicerIO` that can not be deleted. I am also unable to delete it manually using either Windows CMD or the GUI. When I attempt this, it says that Windows can no longer find the file.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/a/4a848884596339f5bf4ccb3eb23fb7b7e3cddabb.png)

Inside the \_\_BundleLoadTempXXX folder there is a subfolder with a patient name. I am unable to open this subfolder (Windows says that the data is unavailable), and it appears to be empty. The subfolder is named XXXXXX Xxxxx. (with a period at the end). My guess is that it’s this period that is causing issues.

Even after a system restart, I was unable to delete the temporary folder. Has anyone ever encountered this before?

Thanks,  
Edward

Edit: System Settings:  
Windows 11 Pro  
Slicer 5.6.2

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 14, 2024, 2:19pm UTC](https://discourse.slicer.org/t/loading-mrb-file-leads-to-creation-of-temporary-file-that-cannot-be-deleted/37363/2 "2024-07-14T14:19:56Z")

</div>

Most likely some third-party antivirus or computer monitoring software keeps the folder open while trying to inspect its content and so Slicer cannot delete it. You should be able to delete the empty folders after you restart your computer. You can also just leave the folders there, as their presence does not cause any problem and don’t take up space.

You can install a utility like [LockHunter](https://lockhunter.com/) that may be able to tell what application is locking the file and that can help with solving the issue.

You can also choose a different location for cache folder (in menu: Edit / Application settings / Cache / Cache location), which is not monitored or uses a more robust file system.

---

<div class="post-metadata">

**Author:** ![edwardwang1](https://avatars.discourse-cdn.com/v4/letter/e/858c86/32.png) [@edwardwang1](https://discourse.slicer.org/u/edwardwang1)\
**Post date:** [July 17, 2024, 6:45pm UTC](https://discourse.slicer.org/t/loading-mrb-file-leads-to-creation-of-temporary-file-that-cannot-be-deleted/37363/3 "2024-07-17T18:45:04Z")

</div>

Hi Andras,

Thanks for the reply. I mentioned this to my colleague and they were able to give me a new .mrb without that issue. Also, after restarting my computer I was able to use CMD to get rid of the folders.
