Menu

Rename files plugin

Korvolant
2010-11-05
2015-10-18
  • Korvolant

    Korvolant - 2010-11-05

    Hi all,

    this plugin allows to
    automatically rename/copy/delete attached files. Files can be renamed
    according to their BibTeX entry. The rename pattern uses the same syntax as a
    BibTeX key generator of JabRef.

    Best,
    Sergey

     
  • mel

    mel - 2010-11-06

    Hi
    I just tried your plugin, and my first word is "it's wonderful!" Thanks so
    much. I didn't have time to tried extensively, specially to see if multiple
    selections is working (batch rename).
    It will be very useful to automatically correct my mistyping when I named pdf
    after download.
    Good work,
    Mel

     
  • Anonymous

    Anonymous - 2011-01-07

    Can you repost the plugin please? The original link is broken.

     
  • JuanB

    JuanB - 2011-04-25

    Repost the plugin!

     
  • Adamz Zhao

    Adamz Zhao - 2011-09-14

    Excellent job! Batch rename works well. It's very useful to share libraries
    in group users.

    One thing should be improved:
    If an entry contains several files, for example, a main pdf file and several
    supplemental xls table files, the plugin should have an option for users to
    add file name postfix for them, or the plugin do it automatically.

    Currently, I manually do it by adding supp1, supp2…suppN for these attaches.

     
  • Dirk Smith

    Dirk Smith - 2011-11-02

    When I rename my files, the link in the citation won't get an update, i.e. it
    loses the connection to the file! is that normal?!

     
  • Korvolant

    Korvolant - 2011-11-17

    The file link is always updated!
    Right after renaming the file Jabref may not represent this information
    correctly in the "BibTeX source" tab. Click the "General" tab to see the
    correct file link.

     
  • Anonymous

    Anonymous - 2012-06-15

    this seems like it would be cool, but it doesnt work for me.
    is it possible that this plugin doesnt work in jabref 2.8?

     
  • Regis Alenda

    Regis Alenda - 2012-06-30

    I have an error when trying to rename a file (JabRef 2.8):

    Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: net.sf.jab
    ref.MetaData.getFileDirectory(Ljava/lang/String;)Ljava/lang/String;
    at renamefile.Utils.getFileDir(Utils.java:79)
    at renamefile.RenameDialog.renameFile(RenameDialog.java:266)
    at renamefile.RenameDialog.actionPerformed(RenameDialog.java:234)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
    at
    javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java
    :404)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListen
    er.java:252)
    at java.awt.Component.processMouseEvent(Component.java:6268)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6033)
    at java.awt.Container.processEvent(Container.java:2045)
    at java.awt.Component.dispatchEventImpl(Component.java:4629)
    at java.awt.Container.dispatchEventImpl(Container.java:2103)
    at java.awt.Component.dispatchEvent(Component.java:4455)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4297)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227)
    at java.awt.Container.dispatchEventImpl(Container.java:2089)
    at java.awt.Window.dispatchEventImpl(Window.java:2517)
    at java.awt.Component.dispatchEvent(Component.java:4455)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:649)
    at java.awt.EventQueue.access$000(EventQueue.java:96)
    at java.awt.EventQueue$1.run(EventQueue.java:608)
    at java.awt.EventQueue$1.run(EventQueue.java:606)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControl
    Context.java:105)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControl
    Context.java:116)
    at java.awt.EventQueue$2.run(EventQueue.java:622)
    at java.awt.EventQueue$2.run(EventQueue.java:620)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControl
    Context.java:105)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:619)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.ja
    va:275)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:
    200)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.ja
    va:190)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

     
  • Morten Omholt Alver

    Hi,

    the problem with running this plugin with JabRef 2.8 or 2.8.1 comes from an
    unfortunate change in the method signature of a method that the plugin uses.
    It's fairly easy to modify the plugin to work with the new versions, but then
    it won't work with the old ones. Using reflection, the plugin can probably
    also be rewritten to work with both new and old JabRef versions.

     
  • Korvolant

    Korvolant - 2012-07-25

    Hi,

    Renamefile 1.3 should work
    now with both JabRef 2.7 and 2.8.

     
  • Regis Alenda

    Regis Alenda - 2012-07-26

    Hi,

    It works well now. Thanks korvolant!

     
  • Oliver Kopp

    Oliver Kopp - 2012-09-09

    Good to see plugins being developed for JabRef.

    Regarding the renaming functionality, the master branch of JabRef contains a
    similar functionality: "Cleanup entries". One can grab a snapshot here:
    http://ge.tt/9Idc446.

    Is it possible to merge the rename functionality somehow?

     
  • Miguel

    Miguel - 2012-09-14

    This is a great plugin!

    One suggestion though: I think that when deleting files it would be safer to
    send them to the Trash instead of plain removing them. Of course, this means
    to detect what kind of OS (and flavour) is being used, which may be or may
    not be easy… Perhaps adding a confirmation dialogue window would suffice.
    I would like to see this plugin listed along with other JabRef plugins, I
    found it quite by chance.

    Thanks!

     
  • Korvolant

    Korvolant - 2014-07-05

    New releases can be downloaded here:
    https://github.com/korv/Jabref-plugins/releases

     
  • Alan Belle

    Alan Belle - 2015-10-18

    Thanks for the Delete functionality Korvolant. I think, like others, it should be part of JabRef. May I suggest the following warnings in your help file, or Delete Pop-up:

    1: Delete performs no checks whether the file is required by another entry!
    2: Delete has no way of knowing if other .bib files link to the files for selected deletion.
    3: The deletion is immediate and permanent with no move to "Trash".
    4: Use the tick boxes to select files for deletion: not highlighting.
    5: It does not delete, or warn that deletion is unsuccessful for files linked through <Preferences><External programs="">"Legacy file Fields". It does remove the link in JabRef (the BibTex file).

    Comments on the above:
    1: This is hard to do manually, making this functionality very helpful if it could be added. If there is a duplicate entry you want to keep this would remove the file (I know you should not in that case delete in the first place.) The second case is where I have proceedings and link multiple references to it. By deleting the file you take it out for all linked entries. I have tried to avoid this links rats nesting of database to repository with https://sourceforge.net/p/jabref/feature-requests/895/
    2: This is something I did not originally think of, because I have a huge single .bib database and repository, from which I extract a non-database .bib file for citations in each paper. http://sourceforge.net/p/jabref/mailman/message/24753487/ This has to be up to the user to ensure no cross linking, but a warning would be a useful reminder.
    3: Perhaps rather than delete, you could copy to a "deleted file folder", making cross-platform implementation easier and make note 1: permanent deletions less painful.
    4: I kept deleting everything because I intuitively highlighted, as I did not notice the tick boxes.
    5: I have legacy imported files from EndNote that inexplicably generates a file stucture with each file being located in a directory of the same name eg: ://a1 preamble-2340525056/a1 preamble.pdf:PDF. It would therefore be nice to have an option to "open containing folder" like PDF-XChange when deleting to manually check and clean up if desired.

    PS: Noted @Oliver below and will file an "issue" when I get a second. I hope you can make it functional again, or <attached file="" delete=""> is integrated into JabRef.

     

    Last edit: Alan Belle 2015-10-18
  • Oliver Kopp

    Oliver Kopp - 2015-10-18

    Please note that JabRef v2.80 will remove plugin functionality. See https://github.com/JabRef/jabref/issues/152 for a discussion. We recommend integrating the functionality somehow.

    @Alan: Could you file an issue at https://github.com/JabRef/jabref/issues describing your requirements on file deletion? Where should it be available etc.