I have around 2,000 entries on a Movable Type set-up (4.23) that currently have main/parent categories assigned like, say, "apple, pear, banana, grape". I want to keep those as sub-categories and then through some magical, bulk solution assign all of them a new parent category of "Fruit".
It runs on a MySQL database, so my first instinct was to go through there but the the table for each entry doesn't contain a field to modify categories. Those are assigned through a table called mt_placement and it's kind of cuckoo to go in there.
I don't know any magic, but Perl and the MT API are enough. Here's how you set an entry category in Perl:
You'll need to iterate through the entries, and $fruit_cat_id is the numerical category ID for "Fruit" in the blog in context (categories are per blog i.e. you can have a "Fruit" category in two different blogs but they will have different category IDs).