<?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[Create REN Batch File?]]></title><description><![CDATA[<p dir="auto">How can I automatically convert a list of filenames (in a text file) to reverse the filename based on a dash?</p>
<p dir="auto">My file has (hundreds) of filenames listed …  (I can easily remove the .epub extension before conversion, and add it back after the list is “fixed”.)</p>
<p dir="auto">This would be the starting file contents …</p>
<pre><code>Pride and Prejudice - Jane Austen
Moby Dick - Herman Melville
A Tale of Two Cities - Charles Dickens
</code></pre>
<p dir="auto">This would be the converted file contents …</p>
<pre><code>REN "Pride and Prejudice - Jane Austen" "Jane Austen - Pride and Prejudice"
REN "Moby Dick - Herman Melville" "Herman Melville - Moby Dick"
REN "A Tale of Two Cities - Charles Dickens" "Charles Dickens - A Tale of Two Cities"
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/topic/19587/create-ren-batch-file</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 16:05:56 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/19587.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 21 Jun 2020 05:20:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Create REN Batch File? on Sun, 21 Jun 2020 19:28:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/195">@guy038</a> This is awesome!  Thank you so much! It worked perfectly.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/55246</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/55246</guid><dc:creator><![CDATA[Ron Ball]]></dc:creator><pubDate>Sun, 21 Jun 2020 19:28:18 GMT</pubDate></item><item><title><![CDATA[Reply to Create REN Batch File? on Sun, 21 Jun 2020 13:15:06 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/19006">@ron-ball</a> and <strong>All</strong>,</p>
<p dir="auto">Really <strong>easy</strong> with <strong>regular</strong> expressions !</p>
<p dir="auto">So , assuming a <strong>simple</strong> list of filenames, with any <strong>extension</strong>, like below :</p>
<pre><code class="language-diff">Pride and Prejudice - Jane Austen.epub
Moby Dick - Herman Melville.epub
A Tale of Two Cities - Charles Dickens.epub
</code></pre>
<ul>
<li>
<p dir="auto">Open the <strong>Replace</strong> dialog ( <strong><code>Ctrl + H</code></strong> )</p>
</li>
<li>
<p dir="auto">SEARCH <strong><code>(?-s)^(.+)(\x20-\x20)(.+)(\..+)</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>ren "$0" "\3\2\1\4"</code></strong></p>
</li>
<li>
<p dir="auto"><strong>Tick</strong> the <strong><code>Wrap around</code></strong> option</p>
</li>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> search mode</p>
</li>
<li>
<p dir="auto">Click, once, on the <strong><code>Replace all</code></strong> button</p>
</li>
</ul>
<p dir="auto">You should get the <strong>expected</strong> result :</p>
<pre><code class="language-diff">ren "Pride and Prejudice - Jane Austen.epub" "Jane Austen - Pride and Prejudice.epub"
ren "Moby Dick - Herman Melville.epub" "Herman Melville - Moby Dick.epub"
ren "A Tale of Two Cities - Charles Dickens.epub" "Charles Dickens - A Tale of Two Cities.epub"
</code></pre>
<p dir="auto">Voila ;-))</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/55233</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/55233</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 21 Jun 2020 13:15:06 GMT</pubDate></item><item><title><![CDATA[Reply to Create REN Batch File? on Sun, 21 Jun 2020 11:59:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/19006">@Ron-Ball</a> said in <a href="/post/55223">Create REN Batch File?</a>:</p>
<blockquote>
<p dir="auto">Pride and Prejudice - Jane Austen<br />
Moby Dick - Herman Melville<br />
A Tale of Two Cities - Charles Dickens</p>
</blockquote>
<p dir="auto">From the given example you would build three groups like<br />
find:<code>(.+)( - )(.+)</code><br />
and<br />
replace: <code>REN "$1$2$3" "$3$2$1"</code></p>
<p dir="auto">Hopefully your data is exactly as posted.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/55231</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/55231</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Sun, 21 Jun 2020 11:59:35 GMT</pubDate></item></channel></rss>