renaming with zotfile does not delete original file

My Zotfile workflow does not work anymore. When renaming linked attachments into a new folder, it does not delete the original file. Any ideas why? I do not have the original file opened.

More explanation:
I have pdfs in folder A, that I import into Zotero (as linked attachments) and then use Zotfile to rename the files and move them into a different folder B (which contains my library).

Previously, this worked well. However, today I discovered that Zotfile seems to leave the original files in folder A and creates an additional (renamed) file in folder B. I want it to instead move the file, so that the old file is deleted from folder A.
Previously this worked well (except when I accidentally had the original file open) but now it doesn't anymore.

By the way, I just checked, the renaming does still work correctly from my Firefox download folder, which is the watch folder for Zotfile. So if I download a new pdf, and Zotfile detects it and suggests to attach it to the highlighted Zotero entry, the renaming and moving works fine and the original pdf is deleted from the download folder.

Strange. Do you have an idea which settings I may have messed up to create this outcome?
  • edited August 18, 2016
    (edited)
  • I don't think there is even a setting to get what you're describing. ZotFile always tries to move files, so what you're seeing is either a bug or something on your system preventing ZotFile from deleting the file in its original location.
    Can you try with a different source folder for testing?
  • Thank you, Adam (once again :))

    I tried a couple of things and found that

    - renaming WITH MOVING works correctly ONLY with the watch folder function. So if I download a new pdf, and Zotfile detects it and suggests to attach it to the highlighted Zotero entry, the renaming and moving works fine and the original pdf is deleted from the download folder.

    In all other cases that I tried, a new, renamed file is created but the original file is kept
    - when I import a file as linked attachment or as a file from a different dropbox input folder
    - when I import a file as linked attachment or as a file from a folder on my local harddrive
    - when I import a file as linked attachment or as a file from my firefox download folder. This is the folder from which the files are moved when I use the popup function (as described above), but apparently the file is not deleted when I manually add it to Zotero.

    I am not aware that I downloaded any updates for Zotfile. Are there automatic updates that could have introduced a bug?!
  • yes, all add-ons update automatically (as does Zotero), so it's certainly possible.
    But FWIW, this works correctly for me with Zotfile 4.2.6 in Zotero for Firefox on W10.
    I.e.
    1. Attach a link to a file
    2. Right-click on that file --> Manage Attachment --> Rename Attachments

    Moves (not copies) the file to the specified ZotFile custom directory.

    What's your setup?
  • Basically, I have a folder (B, the one that I want the attachments to be in) specified in Zotfile as Custom Location, and I click on Manage attachment/rename attachments like you describe.

    I don't know how to summarize my setup in a more informative way. Do you want me to list all settings? I described my complete workflow here previously, but I dont suppose you want to read that? https://forums.zotero.org/discussion/60016/howto-question-about-order-of-importing-moving-renaming-setup-dropbox-sync/

    By the way, I tried whether it has to do with meta data extraction, but it does not, the original file remains (in folder A) whether I attach a link to the pdf to an existing Zotero entry and then rename, or whether I drag and drop the file into Zotero as a new entry, retrieve meta data and then try to rename it.
  • no, by setup I mean which OS and version numbers for Zotero and ZotFile
  • edited August 18, 2016
    oops, sorry for that. I use Windows 7, Zotero 4.0.29.10 Desktop version, Zotfile 4.2.6
  • I have the same problem — was this solved? @adamsmith
  • You have to select the Zotero entry NOT the attachment. AND then select the rename option.
    I had the same issue and I realized there are two ways to rename my pdf attachments. One where you right click on the attachment and rename it. This does not send your file to the zotfile library.
    CORRECT WAY:
    1. Right click on the zotero entry (again, NOT the attachment)
    2. Select "Manage Attachments"
    3. Select "Rename Attachments"
    4. Wait a few seconds. Your attachment will be renamed and sent to the Zotfile library.

    If you want to set up where your pdfs will be saved, set it up on the zotfile preferences.
  • I have the same problem. Katerine1103's solution did not work for me. The pdf is copied to the new location, but does not delete from the original location.
  • edited December 2, 2021
    I found a solution to this problem. Katerine is right, but I guess we have to be more specific. I have Zotero setup with linked files, so I only locally store the pdf's (not on the Zotero cloud server). I use the Zotfile plugin, which is also installed.

    Usually I just dragged pdf's from my local drive to the Zotero item. Zotero then attaches and renames the pdf. It creates a new file with the right name and date (helped by zotfile), AND leaves the copy of the original file in the folder.

    But if I don't drag the pdf from my local drive to the Zotero item, but instead go to the (newly created and still empty) Zotero item. Right click on the Zotero-item and then attach the pdf (by browsing to the location of the original pdf, and then click on the original pdf), then the pdf is attached and renamed, and there is no copy of the original pdf left in the folder.

    Hope this helps!

    ps. It would be great if there was an option in Zotfile by which you can specify "replace originals pdf when dragging file" or something. Because it is much faster!
Sign In or Register to comment.