question: convert multiple files in powershell
designel opened this issue · 2 comments
hello,
I have many md files that I need to convert to pdf , I would like to use the md!-to-pdf , but when i try to convert many file in the same time I have the message below :
PS C:\Users...\Template> md-to-pdf "./.md"
× generating PDF from ./.md
→ ENOENT: no such file or directory, open 'C:\Users\User\Folder1\Documents\Te…
ListrError: Something went wrong
at C:\Users\user\AppData\Roaming\npm\node_modules\md-to-pdf\node_modules\listr\index.js:102:18
at async main (C:\Users\user\AppData\Roaming\npm\node_modules\md-to-pdf\dist\cli.js:118:5) {
errors: [
[Error: ENOENT: no such file or directory, open 'C:\Users\User\Folder1\Documents\Template\.md' \archive_tous\Documents\Template.md'] {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\Users\User\Folder1\Documents\Template\.md'
}
],
context: [Object: null prototype] {}
thanks in advance.
Well, unless you have a file called ./.md
in the current folder, that won't work. Did you mean .\*.md
without the quotes? There's some info about using shell globbing right there in the readme: https://github.com/simonhaenisch/md-to-pdf#usage.
Note: there's no internal processing of paths with wildcards/glob patterns... you have to get the shell to expand it into multiple paths, and md-to-pdf
will pick up each input argument as one file path to process.
hello,
thank you so much for your reply ,
it's okay, I can generate my pdf.