Hi in my vault we had some pretty complicated templates that we are discontinuing. Over the course of 2 years they have generated thousands of empty folders... is there a good way to find and delete them? Thanks!
Delete file and delete folder are separate permissions, so you could always try creating a user with delete folder but no delete file permissions and try to delete everything in the vault and see how it goes... I tested in 2017 Beta and it worked fine but best to do with a good backup and no one in the vault. It will say it's going to delete folders that aren't empty but it'll fail to since it can't delete the files in them.
There may be a way in SW Task Scheduler, or SW Explorer. I have not tried it.
Hello terry, check out S-057454 in the SolidWorks Knowledge Base there is a tool attached there to help you find and delete empty folders in a PDM vault.
Could you double check the number? I'm not seeing it in KB. Or is it only available to VARs?
Hi Terry, it might only be for VARs. See instructions and the tool attached:
* Please back up the vault database and archives before using any custom API tool to modify the vault. Test this application thoroughly in a copy of the vault before running it live. It has not been tested or verified with different versions of SOLIDWORKS Enterprise PDM *
1. Extract the content of the zip file to the local hard drive
2. Make sure SOLIDWORKS Enterprise PDM is installed on that machine
3. Make sure the machine is disconnected from all vaults.
4. Open ePDM_Empty Folder Manager.exe.config in Notepad and replace "SPECIFY THE VAULT NAME HERE" by the name of the vault. Save and close.
5. Execute ePDM_Empty Folder Manager.exe
6. Make sure to use an administrator login with enough permission to delete the vault folders
7. When prompted accept to delete the folder (they will all be permanently destroyed).
Wow thanks! Scary downloading an EXE off a forum from someone I don't know, running it on my vault with admin password, and leaving running overnight while it scans all our folders... =)
FYI that add-in isn't exactly right. It reported 78,000 folders and 45,000 empty folders. I since found some groups of folders that I could verify were emtpy using this report generator:
With that I was able to delete 50,000 empty folders. However I know there are MANY more (100-150k), so I'm not sure how trustworthy that tool is and have decided not to use for time being. Exercise caution if you choose to use.
Are there still files in the trashcan waiting to be destroyed, the tool might mark folders containing only deleted files as not empty.
Good thought but no, no files were ever placed in these folders.
Also since they're template folders you can always search for folders with a specific name and select all of those and delete them, that should get most of them I would think.
Yes good thought, this is exactly how I identified above 50,000 folders.
Wow this is ingenious. I did this and it worked. Ended up deleting ~200,000 folders...!
Retrieving data ...