We accidentally created 70,000 mfhds in Voyager and needed to delete them. Using Voyager's webadmin this would be a tedious task. First, we'd need to export an interleaved MARC file of bibs and mfhds and then import it with some weird settings in order to just delete the mfhds. It's ridiculous. Luckily, Voyager ships with an API named BatchCat.dll, which allows you to write software to add, modify, and delete records from the catalog.
Using BatchCat, we can simply connect to Voyager and say, "Delete this mfhd," and it just works. Wonderful. Anyway, this is the code I used to ultimately delete the mfhds. It reads an input file with one mfhd id on each line and deletes it and goes to the next. It does not attempt to delete any items attached to the mfhd. It also runs super fast (approximately 50,000 in 2.5 hours)
This is my first crack at C#. I hate it and have no desire to learn it, so please forgive any mistakes or clumsiness in the code.
Thanks to Paul Hoffman's Robocat, which helped me figure out the basics of C#.