It is easily possible to add arbitrary field contents to entries with Biber's sourcemap features.
With
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear, backend=biber]{biblatex}
\DeclareSourcemap{
\maps[datatype=bibtex,overwrite=false]{
\map{
\step[fieldsource=entrykey, match={.*}, final]
\step[fieldset=file, fieldvalue={$1.pdf}]
}
}
}
% just to print the 'file' field
\DeclareFieldFormat{file}{file: \path{#1}}
\renewbibmacro{finentry}{\printfield{file}\finentry}
\addbibresource{biblatex-examples.bib}
\begin{document}
\cite{sigfridsson,nussbaum,worman,geer}
\printbibliography
\end{document}

You would add to each entry the equivalent of
file = {<entrykey>.pdf},
to all entries that don't already have a file field.
You don't even need RegExes here, you could just say
\DeclareSourcemap{
\maps[datatype=bibtex,overwrite=true]{
\map{
\step[fieldsource=entrykey, final]
\step[fieldset=file, origfieldval, final]
\step[fieldset=file, fieldvalue={.pdf}, append]
}
}
}
which would overwrite an existing file field. The overwrite=true is needed because an append step must formally be able to overwrite a field. You can guard against overwriting a pre-existing file field by adding
\step[notfield=file, final]
as first step.
But it seems rather pointless to add a field file with the sole contents <entrykey>.pdf to all entries. The information you are adding is a very simple function of information that is already present in the entrykey field, after all.
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear, backend=biber]{biblatex}
\DeclareFieldFormat{fakefile}{file: \path{#1.pdf}}
\renewbibmacro{finentry}{\printfield[fakefile]{entrykey}\finentry}
\addbibresource{biblatex-examples.bib}
\begin{document}
\cite{sigfridsson,nussbaum,worman,geer}
\printbibliography
\end{document}
Would produce the same result but without the need to map any field contents.
\pathnormally does not link stuff, but instead of\path{XYZ}you could say something like\href{file:XYZ}{\path{XYZ}}and things should be linked (provided you loadhyperref). This is independent of the solution you use and would be the same if you just gavefilein the.bibfile. – moewe May 05 '19 at 05:23\Url Error ->\url used in a moving argument? – KcFnMi May 05 '19 at 07:41DeclareSourcemap? – KcFnMi May 05 '19 at 09:22biblatexmanual (http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf) has an example section than the Biber documentation, but apart from that there is not a lot of other 'systematic documentation' out there. You can find plenty of examples on this site and elsewhere, though. – moewe May 05 '19 at 09:34overwrite=falsebut after that, for the non RegExes code you useoverwrite=tru? – KcFnMi May 05 '19 at 09:35overwrite=falseavoids overwriting an existingfilefield. (The second\stepis not allowed to overwrite an existingfilefield.) The non-RegEx-solution needsoverwrite=trueto work properly, because the third\stepwithappendformally needs to be able to overwrite thefilefield. In consequence that means that this solution overwrites an existingfilefield. – moewe May 05 '19 at 09:42final? – KcFnMi May 05 '19 at 09:56finalmeans that the following steps will only be executed if this step was 'done successfully'. The steps following\step[fieldsource=entrykey, final]for example will only be executed if the entry has a non-emptyentrykeyfield. In this case most finals are not needed (because every entry must have a non-emptyentrykeyfield and.*will match all contents), but there are cases wherefinalis important, so I got into the habit of addingfinalin most of my\steps. – moewe May 05 '19 at 10:01\perdatasource{<filename.bib>}and copy-and-paste. – moewe May 05 '19 at 10:39