(I apologize this isn't really an opus-specific question. If this is frowned on or not allowed please tell me.)
I wrote a script that recursively deletes empty subfolders and then the active folder if it is empty. The problem I run into is misc. files that Windows creates.
I believe it is safe to automatically delete desktop.ini, and the thumbnail one (can't remember what it is called.)
*So my question is, does anyone know of any other trash that Microsoft hides in folders that I should also delete?
If you aren't sure, it's best to just leave things alone. Those files tend to be minuscule in size and will not cause any problems just by being there. There's no reason to go looking for tiny/empty things to delete if they aren't actually getting in your way.
One thing I do do is set up a filter on my C:\ folder to hide a lot of the files and folders there that I never want to see or do anything with, to make navigating to the folders I do go into from there nicer. Hiding things can reduce clutter without worrying about deleting them, and Opus lets you set up wildcard filters on a per-folder basis if you want to.
I believe you misunderstood my goal. I am cleaning up unused folder after moving out the content I want to keep. I want to delete the folders if they are empty. the problem is desktop.ini will block the delete since it is technically not empty.
So I must delete the unneeded desktop.ini and thumb.db. leaving it alone will prevent deleting the folder that I don't need anymore.
Also, I end up with folder that have random mac files and folders. If anyone knows the commons ones, that I can delete that would be great.
Obvioulsy, I can monitor this and then add it to the code as I find them, but if anyone knows off the top of thier head that would be helpful
It’s going to come down to the individual situation in that case. If we’re including things as diverse as other operating systems then no one can predict which files might have been left behind by anything else, without knowing all the things that have touched the folders.
Best thing to do is look at the files that are left and look up any you don’t recognise to see what they are.