Exclude collection from SYNC

Hi,

Is it possible to exclude an individual collection from synchronization?
I made some changes to my workflow and needed to create a new collection structure. Since the old items in the library do not meet the new requirements, I had to separate them into the 'old' collection. I still need this collection because some of the manuscripts are still in the publication stage. However, I do not want to keep it in the Zotero cloud where I am creating a new library. It's enough for me to export it to a hard drive from where I can add it to the synchronized library. I thought it might be possible to "exclude" it from syncing? If not, do you have any ideas on how to keep it locally (also as *.rdf) but get it out of the cloud?

Kind regards,
Dominik
  • Not possible, no, and I don't think it will be in the future given how collections are set up.

    It's not quite clear to me why it's important to you to not have the collections sync? I'd very much advise to keep them around certainly until all related articles are published: you'll not do yourself a favor if you don't have the original items around when you need to re-visit a manuscript.
  • You could convert the collection's attachments to linked files in a designated folder, using the zotmoov or attanger plugins (v7 compatible).

  • @adamsmith: I am trying to recover some space on Zotero Cloud. Over the past few years, I have tried several bibliography managers, including Endnote, Citavi, Mendeley, and Zotero. In the end, I decided to stick with Zotero. Unfortunately, I used to collect data in a rather chaotic manner (in the testing phase), which resulted in a space usage of more than 40%. Now that I have a defined workflow, I wanted to clean up the old mess.
    @tim820: Do you mean moving the attachments (which take up space in the cloud) from Zotero to a directory, e.g. using Zotmoov, and removing them from the Zotero cloud?
  • Yes. Just right-click Move them in Zotero as linked files (using either plugin's option for that) to the folder designated in the plugin's settings (a file rename may occur at the same time if you have that enabled, using the currently enabled Zotero renaming scheme). As such, the attachments will no longer exist under Zotero\storage. When the next online sync occurs, they will disappear from online storage too (possibly with a short delay). The items' metadata will remain synced online, so the items will still appear online (data syncing is free, ie it does not use your online file storage quota). The items' attachment files will still show as a link online, but will be inaccessible there. They will only be accessible from within Zotero on you computer (and of course directly in their folder).

    As items can exist in multiple collections, you should be sure that the items whose attachments you move do not exist in any other collections ... to which you still need online acccess for attachments.
  • edited September 9, 2024
    @tim820 As this may be a one-way trip I would like to make sure how to do it. Step-by-step instruction:

    1. I install the Zotmoov plugin in Zotero
    2. I configure ZotMoov:
    Directory to Move files to: OneDrive\Zotero_files\
    Files behavior: Move
    X Automatically Move/Copy files when added
    X Automatically Move/Copy to Sub directory
    Sub directory string: {%c}
    Additionally I add html to the Allowed file extension as I used web snapshot sometimes
    3. I mark the items for which I would like to move the attachments from the cloud (Zotero/storage) to the designated folder (zotero_files).
    4. I click the right mouse button and select the option: 'ZotMoov: Move selected to Directory'.
    5. I uncheck option 'Sync attachment files in My library using Zotero'.

    And that's it. From now all my attachments are in folder 'Zotero_files'.

    In case o would like to move files from Directory to 'Zotero/Storage' I will choose: 'ZotMoov: Move selected from Directory'. Am I right?

    In the case of newly added Entry, the files will be automatically stored in 'OneDrive\Zotero_files\'


    I am using default file rename:
    {{ firstCreator suffix=” - “ }}{{ year suffix=” - “ }}{{ title truncate=”100” }}

    I try to avoid the multiplication of entries (the occurrence of the same entry in more than one collection is not possible).
  • I am not sure if your 'X' under #2 means those options are selected or not ... they shouldn't be (unless you want future attachment files moved too; see below).

    This specific Zotmoov setup is designed to move just the one collection you mentioned, manually by right-click Zotmoov: Move Selected To Directory. I assume you don't want it to move all future attachments automatically when they are downloaded (eg via the web connector), which is what most people use Zotmoov for.

    So if you want to keep *everything else* under Zotero\storage (now and in the future), you do *not* turn on automatic saving of attachments to the 'move' directory (or a subdirectory there).

    You can even disable or remove Zotmoov after you have moved your collection's attachments (their new location will already be stored in the Zotero database, so Zotero can find them on your computer).

    It's also a completely reversible operation. You could move attachments back to Zotero storage later, using Zotero's Tools\Manage Attachments\Convert Linked Files to Stored Files (the Zotmoov operation 'Move selected *from* Directory' mimics that function).

    I assume that you currently have file syncing turned ON. It should remain ON in order for Zotmoov's moving of attachments files out of local Zotero storage to also cause their removal from Zotero's online web library.

    It's only worth including HTML web page snapshots if they occupy a lot of space in this collection (note that Zotmoov *does* move HTML files if you ask it to; other plugins may not. But any snaphots stored before Zotero started saving them to a single file in 2020 [v 5.0.93] will probably not be handled).
  • edited September 11, 2024
    @tim820
    I would like to:
    1. Move all existing in library attachments to specified folder.
    2. Move all new attachments to specified folder*. I decided to store attachments outside of the Zotero storage (locally and cloud).

    So, after following the steps related to point 1. and removing attachments from Zotero storage (cloud), I will disable the synchronization of attachments in the sync options.

    My only doubt is if I will be able to freely open the attachment that is stored outside of the Zotero storage (locally) in the Zotero Reader?

    Regarding html snapshoots, I will disable this option and remove all html files from library.
  • When attachments are moved as linked files to the folder on your computer by Zotmoov, their location is updated in Zotero's database. So they will open normally in the Zotero reader on that computer. You can test that with the first file you right-click move.
  • Ok, I tested it and all is fine. The only problem is that ZotMoov works in one direction. When I attached file to item ZotMoov copy it to specified folder and this is OK. But when I delete attachment in Zotero, the file still persists in folder. In this scenerio, it is better to stay with Zotero storage and sync.
  • edited September 12, 2024
    Deletion of linked attachments can be achieved with this plugin (since Zotero does not do so):
    https://github.com/redleafnew/delitemwithatt
  • Does this mean that Zotero does not remove attachments from local folders when they are deleted in the Library?
  • Zotero only does not delete linked files. It does delete files under Zotero\storage.
    https://www.zotero.org/support/attaching_files#linked_files
  • Yes, you are right. When I was testing this issue I found that files are properly removed from the Library but they still exist in the local folders. However, such behavior may results from two factors:
    1. I did not empty the Zotero trash.
    2. At the time of the deletion, I had the folders open in File Explorer.

    Thank you very much for your help!
  • [UPDATE]
    I was wrong. ZotMoov is deleting the external files stored in specified folder if the option 'Automatically delete external linked files in the ZotMoov directiory' is checked.

    Last problem, how safely remove snapshoots from Library?
  • edited September 13, 2024
    You can search for and delete snaphots (under Zotero\storage) as described here:
    https://forums.zotero.org/discussion/comment/474116/#Comment_474116

    Now that Zotmoov is capable of *moving* HTML snapshot files as linked files (Zotfile completely ignored snapshots), how to delete linked HTML snapshots reliably from a linked file folder location is also of interest. I assume the delitemwithatt plugin I mentioned above would do it, as would Zotmoov (when the option you noted is turned ON). As a linked file, Zotero presumably would not delete it (since it doesn't delete any linked files). But I haven't had a chance to test all that. Since Zotero only started saving HTML snapshots as a single file in 2020 (v 5.0.93), one has to be careful with the multi-file style of snapshot saved prior to that date/version.
  • Task completed. Thank you for your help.
  • Unfortunately, I encountered a problem when working on different computers.

    I set ZotMoov to move attachments to a specified folder:
    C:\User\OneDrive\zotmoov_attachments\
    with the option 'Automatically move/copy Files to Subdirectory: {%c}'
    When I moved the files to the designated folder I turned off the synchronization of attachments with Zotero storage.

    On the second workstation I also set the ZotMoov to move attachments to a specified folder:
    C:\USER#2\OneDrive\zotmoov_attachments\
    with the option 'Automatically move/copy Files to Subdirectory: {%c}'

    One can see the paths differentiate with the '\User\' and 'USER#2\'parts. Thus, in the advanced options of Zotero I change 'Linked Attachment Base Directory' to:
    C:\USER#2\OneDrive\zotmoov_attachments\

    And nothing had happened. When I am trying to open attachment Zotero do nothing. Even when I choose 'Open PDF in New Tab' or 'Show File' from te context Zotero do nothing. When I click on 'Revert to absolute path...' and trying to open file, Zotero show 'File not found' window and allow me to locate file.

    Is it possible to relink to all files automatically?

    Where did I go wrong?

  • edited 29 days ago
    Did you set the Linked Attachment Base Directory to the appropriate, different folder on *both* computers ? When you try to open a linked PDF on each computer, do you get an error message ? If so, what exactly does it say ?

    Incidentally, why did you set "'Automatically move/copy Files to Subdirectory: {%c}" ?
    From my earlier post "I am not sure if your 'X' under #2 means those options are selected or not ... they shouldn't be (unless you want future attachment files moved too; see below). "
  • edited 29 days ago
    I forgot to set ZotMoov directory as 'Linked Attachment Base Directory' on a source workstation on which I had done all changes.
    I set it only on second workstation.
  • You need a Linked Attachment Base Directory setting on each computer.
  • edited 29 days ago
    Ok, so after setting the 'Linked Attachment Base Directory' on both computers to:

    1: C:\User\OneDrive\zotmoov_attachments\
    2: C:\USER#2\OneDrive\zotmoov_attachments\

    everything should be OK? Zotero will relink files?
  • edited 29 days ago
    The LABD sets where Zotero *looks* for linked files. The location of all existing and future linked attachment files is effectively saved in the database as the LABD (specific to each computer). So it has to be set on each computer.

    You did several things differently to the instructions given ... selecting options that should have remained OFF. But that should not have prevented your existing files in the desired collection from from being moved/linked correctly. Assuming you have finished moving files, turn them off.
    https://forums.zotero.org/discussion/comment/474466/#Comment_474466

    Re "When I moved the files to the designated folder I turned off the synchronization of attachments with Zotero storage." That has to be ON for the changes to sync across computers. See as I said above "I assume that you currently have file syncing turned ON. It should remain ON in order for Zotmoov's moving of attachments files out of local Zotero storage to also cause their removal from Zotero's online web library." Linked files are never synced by Zotero. That setting is relevant to all your non-linked files remaining synced, and removing the now-linked files from online storage.

    I assume you don't literally mean USER#2 ... I believe # is illegal in all file/folder names.
  • edited 29 days ago
    Dear @tim820
    I really appreciate your help and apologize if I didn't explain everything enough.
    So to the point:
    1. yes, I decided that all new attachments will be saved outside of Zotero storage for this reason I left the option to move to subdirectories {%c} ON.
    This steps, of course, resulted in the removal of attachments from Zotero storage - which is exactly what I had in mind.
    AFTER I MOVED all attachments for existing items, I turned off the option to Synchronize attachments with Zotero storage (which is indicated in the instructions for the ZotMoov plugin).

    2. on the second computer, I made the synchronization with Zotero storage and after it was done, I turned it off. In the ZotMoov settings, I specified a path to the folder on OneDrive. And since the paths are different on both computers I additionally set LABD.

    So my mistake was probably that I didn't enable LABD on the source computer (as mentioned in the ZotMoov plug-in instructions).

    I would like to kindly ask you if Zotero will correctly link the files on both computers? when:

    1. I change the name of the folder so that there is no # character.
    2. I set the LABD on the source computer (where I made the changes) to the path to the folder containing the attachments.
    c:\user1\onedrive\zotmoov_attachements
    3. I set the LABD on the work computer (where I would like to access the attachments) to the path to the directory containing the attachments.
    c:\user2\onedrive\zotmoov_attachements


    Regarding # character in folder name. I double-checked. From OneDrive's point of view, the presence of # in a folder or file name is not illegal. Prohibited are the characters “ * : < > ? / \ | I agree with you, however, that it is better not to use this sign, I will change the name.

    Regarding writing to subdirectories with the {%c} option. Is it a problem that it uses this setting? What is the reason not to apply it?

    In terms of disabling synchronization with Zotero storage. In a situation where I have decided to move all attachments externally, is leaving this option disabled a problem?
  • The "move to subdirectories {%c}" option is only if you want your linked files in a subfolder (subdirectory) under the "move to" directory, named the same as the collection they came from. Relatively few people probably used/use that option with Zotfile/zotmoov/attanger - most people probably have all their linked files in a *single* folder (the 'move to' folder). It's a more complicated setup with subdirectories. I was just recommending the simplest setup. But if it works for you it should be fine.

    Since you've now decided to have *all* attachments linked, turning OFF file syncing does now makes sense. Likewise having the setting to automatically move/link all future attachments turned ON now makes sense.

    I have no way of knowing if Zotmoov and Zotero will work with a # in the folder name. Onedrive naming already has somewhat of a reputation for strange behaviour (albeit in other Zotero contexts). So probably best to avoid #.

    Your 3 steps should allow Zotero to find your linked attachments under those LABD paths on each computer. Assuming the files are actually under those paths and any subdirectories are handled correctly by Zotero.

    Another important plugin for linked file setups is delitemwithatt, used to delete linked attachments (since Zotero doesn't do that).
    https://github.com/redleafnew/delitemwithatt
  • The functionality of the Subfolders with {%c} is now clear to me. I will off this option.
    I removed # character from the folder name.
    I am not sure what do you mean by '...delete linked attachments (since Zotero doesn't do that)'.
    I checked it, and when I removed attachments (or item) in collection, Zotmoov removed linked file (or even folder - in case with {%c} subdirectories). I mentioned about it:
    https://forums.zotero.org/discussion/comment/474130/#Comment_474130
  • edited 28 days ago
    I see that Zotmoov does have the option to delete linked attachments (if turned ON in its settings). Zotfile didn't, which is why delitemwithatt was needed. Not sure about attanger (the other Zotfile-like v7 compatible plugin).
Sign In or Register to comment.