Hello everyone,
Within my company, the projects of the various employees are saved on a “central” PC. We have many old REVIT projects stored on this computer, which are gradually taking up a lot of space. I would like to purge all the projects and at the same time delete all backup files of the “*.0001.rvt” type.
I started building a dynamo script. I can purge the projects but the “Passstrough” node is not working. The backup files won’t be deleted.
I hope you can help me with my problem. Thank you.
Purge éléments non utilisés dans projets.dyn (38.9 KB)
Hi @yohann.heuze1 and welcome
we have ootb nodes there can do the job for backup files. try look under file system, but i will warn you do it right, really hardcore nodes

2 Likes
I would suggest the following is a better solution as it should mitigate false positives.
With a double asterix and double full stops can help you mitigate false positions where the file naming could contain 000 within:
Edit: Also using this method could mitigate it not finding “.0010.rvt” as a possible file to delete when it will need to delete.
3 Likes
heheh @Brendan_Cassidy yeah sure, nice one

1 Like
but what worries me the most is when we use filesystem delete, it seems not goes to bin…and another i guess is danger, is delete directory, and move directory etc…probably just me

I fully agree with you, but that can all depend on how the companies network drives are setup for if it is or is not a issue.
1 Like
First of all, thank you for your quick feedback.
I’m not worried about deleting the backup files because I’m going to purge the old files, and the deletion will only apply to the “.0001.rvt" and ".0001.rte” files. There won’t be any backup files other than the ones I generate.
I’ll test it and let you know.
1 Like
Sorry, but the screenshot of my script and dyn file was not visible. I edited my post.
My problem is that “Passthrough” isn’t working. I purge the projects and then immediately try to delete the created backup files.
not sure, try some transaction nodes , maybe
try purge first, and then use that for wait and then delete the backup files
1 Like
Thank you very much, I just tested it and it works very well. The files are cleaned and the backup files are deleted. Thank you for your efficiency and quick response.
1 Like
Hello,
Since I have a multitude of files to purge and each one will generate a backup file, I will end up with saturated hard drives before the end of the command. Would it be possible to open the first file, purge it, save, close, delete the backup file before moving on to the second and so on ?
1 Like
It is doable, but you’d have to go about things in a more complex way.
How many files do you actually have here? What is their total size in GB? What is the directory structure?
1 Like
yeah i probably dont understand, I have never be in a project where this could be a problem…just build some more datacenters,with dynamo …hehhe
1 Like
If I take the first user, I get 558 projects for a total of 82.8 GB
You’re purging users’s local models, not the central model? This seems problematic.