Batch processing Pandoc conversions in Windows

后端 未结 5 861
遥遥无期
遥遥无期 2020-12-10 08:11

I am trying to convert a large number of HTML files into Markdown using Pandoc in Windows, and have found an answer on how to do this on a Mac, but receive errors when attem

5条回答
  •  难免孤独
    2020-12-10 08:43

    Endoro's answer is great, don't get confused by the parameters added to %i.

    For helping others, I needed to convert from RST (restructured text) to dokuwiki syntax, so I created a convert.bat with:

    FOR /r "startfolder" %%i IN (*.rst) DO pandoc -f rst -t dokuwiki "%%~fi" -o "%%~dpni.txt"
    

    Works for all rst files in folders and subfolders.

提交回复
热议问题