Thanks.
That's what I ended up doing, using a for loop (the (big!) pipe didn't worked, thanks BetterRed
Now, it's working... partially.
One problem remains : some of my tags have spaces in their name, and I get strange results, or no result at all (nothing is exported).
For example : "Langue française"
In my library, I have 66 books with this tag, only 9 of them are exported.
"Littérature étrangère", 1057 books, only one book exported.
"Récits de voyages", 67 books, 4 books exported.
All other books having a tag with a single word are correctly exported, so I suspect the space in the name to be the culprit ?
Code:
set destfolder=I:\test
set searchtag="Littérature française"
calibre -s
del /s /q %destfolder% > nul
for /f %%A in ('calibredb search tags:"%searchtag%"') do (
calibredb export %%A ^
--dont-asciiize --dont-save-cover --dont-write-opf ^
--to-dir %destfolder% --progress ^
--template "{author_sort} - {series}{series_index:0>2s| | - } {title}"
)