Skip to content

Instantly share code, notes, and snippets.

@pagelab
Forked from mmparker/batch_pandoc_win.bat
Created February 17, 2020 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pagelab/e4d7e34d79d689202fdbb821ec2bea9c to your computer and use it in GitHub Desktop.
Save pagelab/e4d7e34d79d689202fdbb821ec2bea9c to your computer and use it in GitHub Desktop.
Batch conversion of .markdown to .html on Windows command line
REM This file converts all of the Markdown files to HTML.
REM Converting in the current directory
REM %%~ni returns just the filename of %%i, not its extension
for %%i in (*.markdown) do pandoc -f markdown -t html5 %%~ni.markdown > html/%%~ni.html
REM Converting a subdirectory - just slap it on front
for %%i in (report_pages/*.markdown) do pandoc -f markdown -t html5 report_pages/%%~ni.markdown > html/report_pages/%%~ni.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment