how to merge collections

I hve duplicative collections and want to merge them into single collections. What is the best way to do this.
Thanks.
  • Depends what you mean. Is it just a duplicate collection, or are the items themselves duplicated — i.e., they show up multiple times in the library root?

    How did you end up with duplicate collections? If this is from multiple imports, the easiest thing is just to sort by Date Added and delete the entire set of duplicates.
  • The collections are not exact duplicates in all cases...if not exact, 90% of items are identical. Others are exact. I think the duplicates came from my attempt to sync with the online version, even though I use only one computer so didn't need to have it in the cloud.
    Fortunately, the items do not show up multiple times below the level of the collection--
    I had to re-install windows for other reasons. The lucky effect was it cleaned out the mess I made by first trying to import files to the new computer resulting in every item duplicated. I read what you had to say on this and learned enough from you to avoid making that mistake when I had to reload zotero.

    Thank you for your help with this. I really appreciate it.
  • I think the duplicates came from my attempt to sync with the online version
    No, syncing can't produce duplicates. You can only get duplicates of entire collections via export/import. (If you do that on different computers, or with different versions of a data directory, the duplicates can show up when you sync with the online library, but the syncing itself doesn't cause them — there's simply no way for that to happen, given how it's designed.)
  • edited December 4, 2022
    Syncing messed up MY collections royally. I mean, REALLY BAD. I just tried to sync two computers and the online backup, and now I've got a BUNCH of duplicated collections, which is why I'm checking out this thread in the first place. So it would be wrong to say that syncing won't produce duplicates.

    So: How's it done? I want to MOVE items, not copy them into the other folder and then have to figure out if they've already been moved to where they belong or not before deleting them from the extra collections. Or, I'd like to click a couple of collections and combine them. Or I want to be able to select all items in a collection to move them so that they can all be moved at once because I've got a LOT of items in my libraries, enough that I had to buy storage. Without a way to do this, I could literally spend days fixing this mess. So I don't want to be arguing about whether this can or cannot happen. It happened. I just need to get this cleaned up quickly. Otherwise, I'll probably end up deciding which collections I want to continue with and ignore the duplicates.
  • @mindhorizon: Syncing does not produce duplicates — it's literally impossible. If you create the same items on multiple computers, including exporting items on one computer and importing them on another (which creates new, unrelated items), and then sync both computers, you could end up with duplicates, but that's not syncing producing duplicates — that's syncing syncing your items, exactly as if you had created any other items on the other computer.

    It's not clear at all what you did or what you're saying the problem is, but if you're saying you have duplicates now, you can use the Duplicate Items view to merge them.

    To be clear, the same item can exist in multiple collections, so those aren't duplicates:

    https://www.zotero.org/support/collections_and_tags#the_zotero_collections_model

    If you want to move items between collections while dragging, you can hold down a modifier key, or you can just delete them from the source collection after:

    https://www.zotero.org/support/collections_and_tags#adding_items_to_collections
  • edited December 5, 2022
    I did NOT use import or export. I clicked a refresh wheel. I've got four copies of my largest collection now on both computers. Dragging with cntl or alt makes a copy of the item, leaving me to figure out what is copied and what isn't. That's no good. I want to MOVE the items, not copy them. And if I can do so in bulk, all the better. So far, I haven't figured out how to move them in bulk.
  • From the linked page
    To move items between collections, hold down Cmd (Mac) or Shift (Windows/Linux) when dragging items to the new collection.
    Not sure where the ctrl or alt comes from. Yes, this works in bulk.

    Do check the date added values on the duplicate items, though: you really want to figure out why the items (or just the collections?) were duplicated: standard Zotero sync really doesn't do this, so something else happened and presumably you'll want to know in order to prevent it from happening again.
  • edited December 5, 2022
    @mindhorizon
    No one here is saying that you don’t have a situation where you have a problem with apparent duplicates. Something happened that has caused problems. That cause _cannot_ be the act of syncing — except in only one situation I’ll discuss below. Alternately, as any item can be included in multiple collections and sub-collections, your apparent massive duplication problem may not be actually duplicate items. To test this you can use the check for duplicates utility. You can also view your library sorted by title and see if there are records with the same title. If there are duplicate titles you should look at the dates and times these were added to your library. You might also want to look at each record to determine the database or publisher that was the source of the item(s). If the items are indeed duplicates, see the next paragraph.

    If you [1] (with automatic syncing turned off) did a database search and downloaded items into a collection named X on one computer and then [2] on your other computer (with syncing turned off) captured the some of the same items after also creating a collection named x and then [3] you synced both computers to your online library; you will have likely unexpected results. In this case the act of syncing didn’t create the duplicates. You created the duplications by downloading the same items more than once. Syncing properly combined what was on each machine.

    If you say more about what was on each computer before you synced and what is there now post-sync; if you say more about what you see from using the check for duplicates utility; someone might be able to help clear the mess. Someone can give advice on how to avoid the problem in the future.

    Question for @adamsmith or @dstillman If I have syncing turned off on both of my computers and

    on Monday create a collection named “xyz” on my macbook and import items then

    on Tuesday on my mac mini I create a collection named “xyz” and import items then

    I sync both computers.

    Will I have 2 collections named xyz with different items or will I have one xyz collection with the combined contents of each earlier collection?

    I seem to remember from more than 10 years ago that I did this and had 2 identically named collections with somewhat different contents. I could easily be misremembering.

  • Will I have 2 collections named xyz with different items
    Yes. The collection name has nothing to do with its identification by the system.
Sign In or Register to comment.