I have a script to delete backup files from folders, with a deep search function included in this. What I want to do is be able to isolate Revit files (Which I have done), but then I need to differentiate between different revit projects in the same folder…
For Example I have:
Then in the same folder I also have:
What I would like to do is be able to put as many different projects as I have in a folder into separate lists, get the total number of backup files for each project, and delete all of them except the last 2.
So in the above example I would only be left with [“Another Project.0002” “Another Project.0003”] and [“Test Project.0006” “Test Project.0007”]
I can do most of this, but I don’t know how to isolate the different project files into two separate lists so that I can exclude the last 2 items in the list from the Deletion.
Any assistance or direction with this would be really helpful!
PS: Ignore the “Excluding first 3 backups” group, no longer going in that direction.