Removing many categories at once: How to?

Started by ubacher, May 15, 2017, 08:55:21 AM

Previous topic - Next topic

ubacher

I am cleaning up my files.
For a large number of files I like to remove all categories but a few.
Anyone know if there is an easy way to do this?
Working with the current panel is too cumbersome for this.

Something like removing all categories in a certain hierarchy would already help.

Removing the files from the db and re-adding them won't work since I then lose all.

Mario

Create a splasher Favorite for the categories to remove?
Select multiple categories (possible when on the same level).

The "Current" tab in the Category Panel works for all selected files, mind!
Maybe combined with a filter to bring the required files into the file window.

Tip: <U> removes the selected files from the current category. Fast.

Unless you have dozens or hundreds of categories spread all over your category hierarchy, this should not take too long.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

I ended up writing a tiny script for the job.
Select all files - mark them with bookmarks - delete all categories via script - add wanted categories to the bookmarked files.

sinus

Quote from: ubacher on May 16, 2017, 08:07:06 AM
I ended up writing a tiny script for the job.
Select all files - mark them with bookmarks - delete all categories via script - add wanted categories to the bookmarked files.

To be honest, I did not understand fully, what you wanted exactly. Hence I thougth, better, I do not write some nonsense.
Now I see, what you wanted.

I think, you could have do also simply create one (temporary) category, set the action in the properties to "Un-assign from all" and then put all files into this special category.
Then all cats would have been gone (unassigned), except of course this special one.

Sorry not to wrote this, but at least you are a quick scripter  :D hence it was surely made quick for you.  8)
Best wishes.
Best wishes from Switzerland! :-)
Markus

Mario

Your un-assign from all trick would work if the OP would not have wanted to un-assign from selected categories only.

In the rare situation where you want to un-assign many images from many-categories which are distributed over remote sections of the category tree, a bit of manual work (or a script) will always be necessary.

Or somebody writes a small app which allows you to copy/paste a list of category names into an input filed, and then un-assigns (or assigns) all selected files to these categories. Easy to do, and a great weekend project script for people who want to learn about how to write apps for IMatch 2017 and IMatch Anywhere.  ;)
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Quote from: Mario on May 16, 2017, 09:17:52 AM
Your un-assign from all trick would work if the OP would not have wanted to un-assign from selected categories only.

In the rare situation where you want to un-assign many images from many-categories which are distributed over remote sections of the category tree, a bit of manual work (or a script) will always be necessary.

Or somebody writes a small app which allows you to copy/paste a list of category names into an input filed, and then un-assigns (or assigns) all selected files to these categories. Easy to do, and a great weekend project script for people who want to learn about how to write apps for IMatch 2017 and IMatch Anywhere.  ;)

Yes, you are correct of course ... but I think (if I understand ubacher correct), that he has just made this with a script:

Select all files - mark them with bookmarks - delete all categories via script - add wanted categories to the bookmarked files.

As usual: IMatch give us several possibilities.  :D
Best wishes from Switzerland! :-)
Markus

sinus

Quote from: sinus on May 16, 2017, 09:24:45 AM
Quote from: Mario on May 16, 2017, 09:17:52 AM
Your un-assign from all trick would work if the OP would not have wanted to un-assign from selected categories only.

In the rare situation where you want to un-assign many images from many-categories which are distributed over remote sections of the category tree, a bit of manual work (or a script) will always be necessary.

Or somebody writes a small app which allows you to copy/paste a list of category names into an input filed, and then un-assigns (or assigns) all selected files to these categories. Easy to do, and a great weekend project script for people who want to learn about how to write apps for IMatch 2017 and IMatch Anywhere.  ;)

Yes, you are correct of course ... but I think (if I understand ubacher correct), that he has just made this with a script:

Select all files - mark them with bookmarks - delete all categories via script - add wanted categories to the bookmarked files.

And in this case my "trick" would have helped also.

As usual: IMatch give us several possibilities.  :D
Best wishes from Switzerland! :-)
Markus

Mario

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

I did think about the method Sinus mentioned:
QuoteI think, you could have do also simply create one (temporary) category, set the action in the properties to "Un-assign from all" and then put all files into this special category.

But I thought that you needed to have a category tree with two branches and assigning to one deassigned all from the other branch.
Just read the help and learned about the Unassign from All action. Thank you Sinus.

sinus

Quote from: ubacher on May 16, 2017, 07:32:45 PM
I did think about the method Sinus mentioned:
QuoteI think, you could have do also simply create one (temporary) category, set the action in the properties to "Un-assign from all" and then put all files into this special category.

But I thought that you needed to have a category tree with two branches and assigning to one deassigned all from the other branch.
Just read the help and learned about the Unassign from All action. Thank you Sinus.

Glad, that I could show you another way. Finally you know IMatch very good, but we can not know all or do forget sometimes something.
But I see, you have even thought at this.  :)

Have a good day! 8)
Best wishes from Switzerland! :-)
Markus