In QGIS, there is this nice tool "Refactor Fields" in the Processing Toolbox :
Using it on a single layer is fairly straightforward.
However, when you plan on using it in a batch mode, one can see the "Fields mapping" textbox. I'm looking for an example of the syntax to be used there. I haven't found any specific documentation yet.
Best Answer
It is not very comfortable to do, but the following is the required syntax for that textbox (I write it in several lines only for the sake of clearness):
For example (remeber to use curly brackets):
You need to write as many lines like the one above as the number of input fields, separated by commas. For example, if your layer contains three fields:
and it should work (it worked for me).
Please note that you may avoid to use this dictionary-oriented syntax and directly use the required values. For example, with reference to the first example, you may simply use:
If you don't use this syntax, the following error will be shown: