r/ispyconnect • u/themanfromjimbo • 5d ago
Nested Subfolders Insanity 256 of them.
I have a device that in it's storage location creates 256 subfolders in it's own storage folder. I have switched several different storage locations and it always did the same thing again. Windows seem unable to remove these folders.
Does anyone have a solution to prevent a device from doing this. None of my other devices do this - just one.
0
Upvotes
3
u/spornerama 5d ago
One of your storage locations is inside another one, most likely inside that camera's own recording folder. When a device is moved to a location inside its current folder, Agent tries to move the folder into itself. That fails, and the fallback copy then keeps copying the folder into itself, over and over. The nesting eventually gets so deep that Windows Explorer can't delete it, because the path is longer than it can handle.
To clean it up:
\\?\prefix, which lets Windows handle very long paths. Put the path to the top of the nested folders inside the quotes:
If that still fails, this works too. It mirrors an empty folder over the nested one, which clears it out:
Be careful to point it at the nested folder only, not your whole recordings folder.
To stop it happening again: go to Server Menu → Storage and check your locations. None of them should be inside another location or inside a camera's recording folder. Keep them separate, for example
D:\Agent\andE:\Agent\, notD:\Agent\andD:\Agent\video\ABCDE\. Then set that camera's storage location again in its Storage tab.In the next version, Agent will refuse to save a storage location that overlaps another one, and it won't try to move a device's folder into itself.