The script above will produce .md
files but not clean. Text is wrap as an 80-character line length.
Add --wrap=none
and will clean .md
files.
Get-ChildItem . -Filter *.docx |
Foreach-Object {
pandoc --from docx --to markdown --wrap=none $_ -o $_.Name.Replace('.docx', '.md')
}