Is there a workaround not only to rename a file (via Cleanup entries or Move to file directory) but also to move it to a subfolder (Article,Book,etc) where subfolder name is the same as entry type?
There is a workaround:
You have to open the entry in the Entry Editor -> General -> File -> RightClick -> Move/Rename File-> Choose your directory...
But I will look if you can specify a global pattern.
perhaps along the filename format pattern there could be a directory format pattern
@Siedlerchr btw, the Move/Rename File is not really a workaround as one has to type the new file name which defeats the purpose of automatic renaming using filename format pattern.
Maybe one can reuse the functionality of the old plug-in https://github.com/korv/Jabref-plugins/tree/master/renamefile/src/renamefilin which supported subfolders in the filename format pattern (at least according to their about file).
@tobiasdiez that's correct, i used that plugin quite a lot and subfolders worked there without an issue.
I will look into that plugin from @korv and see how it could be integrated in JabRef.
@Siedlerchr any updates to this issue?
@davydden Unfortunately not. Atm I have not that much time due do university. But I hope that I soon have more time in a few weeks.
I tried a workaround: \entrytype\\\bibtexkey hoping that it should lead to something good. However, I got Article_Brisigotti2006.pdf so something is replacing the \\ (escaped \) with _. Might be one approach to enable it. (The same thing happens for / btw, I'm on Windows, so it seems that this is explicitly taken care of in the code.) Maybe add a formatter that outputs the file system separator?
I wanted to take care of this in the next days. @oscargus :
My idea was to intdroduce a) either a second field similar to the existing one for filenames or b) to have one field for both.
I like option b), but I think it could have side effects, as the layout stuff is also used for displaying entry previews and for html output
When we internally use the Paths methods from nio, the file system separator is implicit taken care of (btw, Windows supports / as file separator, too)
Yes, maybe having two fields makes sense. The question otherwise is when the /\ to _ mapping occurs. I'm thinking that if it happens for each field and not for the complete layout it should just be to add a new formatter. As long as it is not used everything will be as before. Although I agree that it is sort of ugly from a nio-perspective.
Thank you for reporting this feature request. We think, that is already implemented in our development version and consequently the change will be included in the next release. See https://github.com/JabRef/jabref/pull/1899
We would like to ask you to use a development build from https://builds.jabref.org/master and report back if it works for you.
@davydden
Thank you for your report :+1:
This should be fixed in current master. Please try the latest build from http://builds.jabref.org/master.
In the latest dev I set File directory pattern to \EntryType, however when I choose a paper and do Move file to file directory nothing happens and the paper stays in the same location without \EntryType being used as a folder.
p.s. Filename pattern is \bibtexkey\begin{title} - \format[RemoveBrackets]{\title}\end{title}.
p.p.s. .pdf paths are relative to the .bib file, the one I try was {:Name2017 - Title.pdf:PDF}, which I expect to become {:Article/Name2017 - Title.pdf:PDF},
On a bright side, Cleanup Entries worked as expected and moved my file.
Currently the functionaly works when you import a file with drag and drop or do a Cleanup (Rename PDF).
I will look if that could be added to move file to file directory.
@Siedlerchr thanks!
Most helpful comment
Currently the functionaly works when you import a file with drag and drop or do a Cleanup (Rename PDF).
I will look if that could be added to move file to file directory.