john c. j. john c. j. - 6 months ago 70
Markdown Question

How to convert multiple markdown files at once

I have a folder with several markdown files and I need to convert them to HTML at once.

This works fine:

multimarkdown -b file1.txt file2.txt file3.txt

But this doesn't:

multimarkdown -b *.txt

I get the error in the cmd window:

*.txt: Invalid argument

I also tried
multimarkdown -b "*.txt"
multimarkdown "*.txt" -b
but still doesnt' work.

Maybe I miss something? (I use MultiMarkdown 5.4.0)


The star syntax is actually part of bash which is a unix shell (Mac/Linux), so you I think you won't be able to use it with cmd on Windows.

Use PowerShell instead, or write your own loop, like:

for /r %i in (*.txt) do multimarkdown -b %i