Consolidate PDF files from various subfolders?
Zotero has stored my PDF files in a wide variety of subfolders, and I would like to consolidate them. Some are stored directly in the "Zotero" library folder (I'm using a Mac, so it's /Users/[username]/Zotero). (Many) Other files are saved in Zotero>storage>[random numbers and letters], for example in subfolders called "2RZ8L9YV" or "SD2ZP5A5". I want to move all the PDFs out of the subfolders and into the main "Zotero" folder without breaking the link within Zotero (i.e. so I don't have to relocate each files the first time I want to use it again in Zotero). The directory settings for Zotero and Zotfile are for the main folder (/Users/[username]/Zotero), not any subfolders.
If there is no way to automate this consolidation while retaining the links to the files in Zotero, can anyone at least explain to me why some files but not others are placed in these randomly-named subfolders?
Apologies if this concern has already been addressed elsewhere. I searched and couldn't find an answer to this specific question.
Thanks.
If there is no way to automate this consolidation while retaining the links to the files in Zotero, can anyone at least explain to me why some files but not others are placed in these randomly-named subfolders?
Apologies if this concern has already been addressed elsewhere. I searched and couldn't find an answer to this specific question.
Thanks.
Zotero stores all files within 'storage'. If you have files in the root of the Zotero data directory (which you shouldn't), those are linked files that either you put there or you told ZotFile to put there.
Only stored files should go within the data directory, and generally speaking you shouldn't touch the data directory yourself. If you want to use linked files, you should store those elsewhere on your hard drive, outside of the Zotero directory. You can use the Linked Attachment Base Directory setting to collect those files as relative paths, move them elsewhere, and adjust the base directory setting accordingly. (You can also use the Zutilo plugin to just adjust the absolute paths manually.)
Now the question is: is there any automated way to move the files from the base directory to their proper places in 'storage'? (I have about 500 files there, so I don't want to have to do them manually!)
Thanks.
I don't know if ZotFile has the ability to convert linked files to stored files — that's not possible in Zotero itself (nor is the opposite). If you do have to do them by hand, one way would be to click on a linked attachment in Zotero, right-click, Show File, and then drag the file back to the same item in Zotero to convert it into a stored attachment, and then delete the linked attachment. Alternatively, you could just select all the files and drag them into Zotero as top-level items, and then reorganize them under their parent items.
For anyone else with this problem in the future, I did find a solution here:
https://forums.zotero.org/discussion/34477/moving-storage-folder-by-zotfile
"K. Vijayanth Reddy May 5, 2015 edited May 5, 2015
@allenleeshining: Actually, the second method that you outline, you do not need to transfer files back to Zotero first. Just change the custom folder location and select all your attachments and hit "Manage Attachments>Rename Attachments". They will be transferred to the new location leaving behind just the empty directory tree (no files) at your previous location."
I moved the directory, then sorted resources in Zotero by attachment to see which had broken links (indicated by empty blue circle outline in the attachment column). I added those to a temporary folder, moved the directory back to the place I want it, ensured the Zotfile settings were correct, then selected all and renamed attachments. Worked like a charm. Thanks again for the help.