Automatic 'Rename file from parent metadata' option?

Is there, or could there be, an automatic (i.e. check box preference) for automatically renaming a file from the parent metadata on importation?

For journal papers, I'd rather the file was named author-year-title.pdf straight away, rather than something random and having to manually right click and 'Rename from...' each time.
«1
  • edited December 14, 2011
    Here's the thing: nobody knows this, but under the hood, the file is probably already named the way you want it. Zotero has this crazy distinction between Attachment Label (the thing you see in your library middle pane) and Attachment Filename (which you can see in the right pane or in your file system).

    See this old thread, in which developer Dan Stillman agrees that it could be reasonable to have the attachment label always mirror the physical file name but says "an argument could be made either way").

    I'm adding this small annoyance to the papercuts thread: here.
  • Cool, OK thanks. Yep, I guess I mean the Attachment Label rather than the file name then.
  • I think it would be helpful with automatic renaming on files that are attached to an item manually and not only files that are imported through a translator.

    Johan
  • edited January 20, 2012
    I second this, it should be an option!

    I find myself hitting "context menu" > "rename file using metadata" ALL the time, to be honest, I do it with EVERY file.
    Why wouldn't one want the automatically downloaded PDF to be named properly? Even if... it should be an option to auto-rename using the metadata.

    and no... usually all journal files are NOT named in any rational manner.
  • note again - automatically downloaded files _are_ renamed automatically. See mark's post above.
  • sorry... no offense... but mine are not. Want a video?
  • video isn't necessary, but a screenshot with the attachment (not the item with metadata) selected would help. (post the image to an image hosting site, post link here.)
  • edited January 20, 2012
    ok, I'm a bonehead, of course you're absolutely right.
    Sorry mate, I was busy playing with the sync-server, got a bit frustrated... now it's 3:47am and apparently my reading ability is of no use at this time... thought about the label.
    I had never checked the filename prior to renaming the label either. Think before typing is definitely something I should consider twice around this time of day.

    please go ahead and delete this superfluous comment of mine. sorry again.
  • no problem.
    I'm still a bit torn about the labels - I think mark probably is right that they create too much confusion. That said, I look at them all the time, because they're a super quick way for me to see where an entry came from.
  • Hi I am new to Zotero and am confused by this thread. Can someone tell me if the following is possible?

    Can I add a pdf to the Zotero Mac application (either by dragging and dropping onto the app or pasting it into the Zotero storage folder) and then have Zotero automatically fetch the metadata for that PDF and automatically change the PDF filename (as seen in Finder) to Author_Year_Title.pdf.

    Being new to the application, I can't tell if this is possible from the above discussion.

    Thank you.
  • drag the pdf to Zotero, right on it and select "Retrieve Metadata..." if that works, rename the pdf by right-clicking on it --> "Rename file from parent metadata".
  • @adamsmith I did not know about this function! Some retrospective housekeeping is in the offing, I feel! Thanks for this!
  • If you search for '.pdf' you can select all (cntl+A) and right click on any of the pdf attachments and 'Rename file from parent metadata'. If you have lots of files this will cause Zotero to become unresponsive but it should still name those files. This seems to change both the label of the attachment that is displayed in Zotero as well as the name of the actual file. Version 3.0.8.
  • (you should upgrade to 3.0.14)
  • I still think it would be nice to be able to automatically rename the "attachment label". Im in a situation where I want to backup my library, so tried to zip my zotero directory. UNfortunately a lot of the pdfs have names that will not allow them to be zipped (evidently windows7 zip doesnt all a hyphen , not sure if parentheses are an issue but I use them too). Anyway I have hundreds of pdfs and want them all auto renamed (Im assuming zotero wouldnt use forbidden characters such as : , Im still assuming all characters and underscore are valid.
  • see baxterj's solution above.
  • edited March 22, 2013
    Zotero uses reserved characters when renaming files. I see for example the following charters Ive surounded in "quotes" used in a random sample I tried
    " ' "
    " . "
    " - "
    as well as greek letters
    I would suggest Zotero replace any potentially reserved characters with an underscore " _ ". How are others saving their libraries? I wanted to as mentioned above, zip my zotero folder, maybe store on google drive, or even transfer via something like dropbox. This sounds like it may just be a issue with trying to zip but I assume that is commonly attempted.
  • None of the characters you listed are reserved characters on windows

    http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx

    I recommend that you try another zip program, but why would you like to zip the zotero data directory? Maybe we can try to solve your problem in some other way.
  • I agree I found that site and the characters were not listed as reserved, yet trying to use the builtin windows compress function resulted in the error window ..."pdf cannot be compressed because it includes characters that cannot be used in a compressed folder, such as -. You should rename this file or directory".
    I agree there are ways to save without compressing, I just prefer that so 1-it is smaller and more importantly 2-I know that it was untouched and not modified since backing up.
  • I misunderstood then. None of these are, of course, reserved characters for filenames (nor are greek letters) (see here for a list - http://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words ). I vaguely remember Dan saying that he isn't willing to code around an operating system's inability to deal with UTF-8 in filenames in the year 2013, so I doubt this will happen. You could try if another zip program performs better. Not allowing hyphens is just laughable.

    I assume most other people don't bother zipping their library. Is that really worth it? Maybe a factor two, but is that worth the trouble?
  • If you want to do backups, wouldn't it be simpler to just use the backup tool that Windows 7 provides? There is really no reason not to do full backups of your computer or your user profile.

    I find it very unlikely that Zotero would be changed because Windows 7 zip utility does not conform to the specification that Microsoft publishes.
  • Agreed, not allowing hyphens is laughable, but then again Microsoft has been providing us comedy for decades.
  • Rintze is right. 7zip will compress folders (zip format) containing files with these characters.
  • Hi,
    Could you explain simple for automatic renaming for attachments (PDF etc) of file items?
    When I add an attachment the name of all attachment must be standard.
    Best
  • edited July 12, 2015
    umitgunes: what's your problem? I'm not sure to understand.
  • edited July 13, 2015
    I have uploaded lots of PDF under different items.
    I can use "Rename file from parent Metedata" But I must do it for each item.
    For example I have 100 item and for changing all PDF's name I must do "Rename file from parent Metedata" 100 times. I would like to in all folder automatically.
    Bet,
    Ümit
  • Hello. I don't know if I haven't searched for it properly, but "I still haven't found what I'm looking for". When renaming a file from parent metadata, I would like to replace the spaces with underscores. Is that possible?

    Saludos.

    Daniel.
  • the easiest way would be to install and use ZotFile, which does this by default. Otherwise you can change the naming schema use by Zotero in the hidden preferences. https://www.zotero.org/support/preferences/hidden_preferences#general_preferences
Sign In or Register to comment.