<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to print notepad++ files from command line\ Batch script.]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I’m trying come up with a batch script that converts all the files in a folder to pdfs and saves them with the same filename along with its previous extension, using notepad++ and cutePdfWriter.</p>
<p dir="auto">Trying to do this in 2 steps:</p>
<ol>
<li>open all the files in notepad++</li>
<li>Print each file and save it in pdf (eg: file1.c.pdf, file1.h.pdf)<br />
CutePdf is set as a default printer.</li>
</ol>
<p dir="auto">Following is the batch script I used to open all the files in notepad++<br />
for /r %%x in (*.c) do (<br />
start “” “C:\Program Files (x86)\Notepad++\notepad++” “%%x”<br />
)<br />
However, not finding a command to ‘print’ all the opened files from the command line or a batch script unlike notepad<br />
Following command opens file1.c in notepad and prints the file in pdf.<br />
notepad /p file1.c</p>
<p dir="auto">notepad++ /p file1.c throws and error “C:\p doesnt exits. Create it?” and opens file1.c in notepad++.</p>
<p dir="auto">I aware of the plugin “Printall”, but this doesn’t suit my situation as I have to manually select the folder and files everytime.</p>
<p dir="auto">Thanks for your input in advance :).</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/12980/how-to-print-notepad-files-from-command-line-batch-script</link><generator>RSS for Node</generator><lastBuildDate>Mon, 14 Sep 2026 23:46:35 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/12980.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 27 Dec 2016 03:27:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to print notepad++ files from command line\ Batch script. on Wed, 04 Jan 2017 10:43:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/angelberry" aria-label="Profile: Angelberry">@<bdi>Angelberry</bdi></a></p>
<p dir="auto">I’m sorry - my memory about this is wrong.<br />
Using google I found <a href="http://superuser.com/questions/477895/printing-from-windows-7-command-line#477910" rel="nofollow ugc">this</a> which confirms your first syntax.</p>
<p dir="auto">Can you double check if you did the necessary steps described in the linked article?</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/20578</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/20578</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Wed, 04 Jan 2017 10:43:36 GMT</pubDate></item><item><title><![CDATA[Reply to How to print notepad++ files from command line\ Batch script. on Wed, 04 Jan 2017 05:15:15 GMT]]></title><description><![CDATA[<p dir="auto">print /d \YOUR_COMPUTER_NAME\CutePDF file1.c</p>
<p dir="auto">throws an error : "Invalid switch - /d " .<br />
Looks like command line is not recognizing the /d switch</p>
]]></description><link>https://community.notepad-plus-plus.org/post/20573</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/20573</guid><dc:creator><![CDATA[Angelberry]]></dc:creator><pubDate>Wed, 04 Jan 2017 05:15:15 GMT</pubDate></item><item><title><![CDATA[Reply to How to print notepad++ files from command line\ Batch script. on Mon, 02 Jan 2017 14:08:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/angelberry" aria-label="Profile: Angelberry">@<bdi>Angelberry</bdi></a></p>
<p dir="auto">if you did it like you wrote than it is wrong.<br />
the command is, as far as I can remember,</p>
<pre><code>print /d \\YOUR_COMPUTER_NAME\cutepdf "%%x".pdf
</code></pre>
<p dir="auto">/d is a parameter for a printing device which is the share name of your pdf printer<br />
\YOUR_COMPUTER_NAME\cutepdf</p>
<p dir="auto">but you provided /d:\%ComputerName%\CutePDF<br />
the colon after d implies a computer device d.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/20509</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/20509</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Mon, 02 Jan 2017 14:08:49 GMT</pubDate></item><item><title><![CDATA[Reply to How to print notepad++ files from command line\ Batch script. on Mon, 02 Jan 2017 10:16:08 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the input, Claudia.</p>
<p dir="auto">The command,<br />
‘print /d:\%ComputerName%\CutePDF file1.c’ does display<br />
“file1.c is currently being printed” on the cmd line but nothing happens.</p>
<p dir="auto">when checked “see what’s printing” option of the default printer (Control Panel\Hardware and Sound\Devices and Printers) an error is displayed.<br />
Document Name - Local Downlevel Document<br />
Status - Error - Printing</p>
]]></description><link>https://community.notepad-plus-plus.org/post/20502</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/20502</guid><dc:creator><![CDATA[Angelberry]]></dc:creator><pubDate>Mon, 02 Jan 2017 10:16:08 GMT</pubDate></item><item><title><![CDATA[Reply to How to print notepad++ files from command line\ Batch script. on Tue, 27 Dec 2016 16:06:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/angelberry" aria-label="Profile: Angelberry">@<bdi>Angelberry</bdi></a></p>
<p dir="auto">npp doesn’t have such switch but is it needed to use npp anyway?<br />
I don’t know cutepdf but can’t you do something like</p>
<pre><code>for /r %%x in (*.c) do (
print /d \\YOUR_COMPUTER_NAME\cutepdf "%%x".pdf
)
</code></pre>
<p dir="auto">which of course means that you have shared the pdf printer as cutepdf.</p>
<p dir="auto">Please double check the print syntax.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/20311</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/20311</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Tue, 27 Dec 2016 16:06:51 GMT</pubDate></item></channel></rss>