Delete All RemoveCollection (v12.12.1b)

Hello, I wanted to make a small button function to run "Delete All RemoveCollection", but it would not delete anything unless selected. For now I have done "Select All" and then "Delete RemoveCollection" but I think "Delete All RemoveCollection" should have worked?

The Delete command's ALL argument doesn't delete all files; it suppresses the confirmation prompt for individual files (if it was enabled in Preferences):

In theory, Delete * REMOVECOLLECTION should work, but if a wildcard is specified then it seems the REMOVECOLLECTION argument is ignored. (I haven't looked at that in detail yet. Update: Fixed in 12.19.5.)

For now, I'd stick with the Select ALL, Delete REMOVECOLLECTION button you have. While I usually recommend against using Select for that kind of purpose, it's not really a problem here where the whole file display will be cleared afterwards.

(Another quick way to clear an entire collection is to delete the collection itself, then re-create it. The Scrap Collection toolbar does that, and that's good if you want the button to always clear a particular collection, without having to navigate to it first.)

(Scripting could also be used to do more advanced things, if needed.)

I should have mentioned I tried "Delete * RemoveCollection" first, as well as "Delete RemoveCollection *" not sure about the syntax, but neither worked. I prefer the flexibility of using this in any collection - might you consider adding an EmptyCollection() method for collections?

Many thanks!

1 Like