<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Quillaja.net &#187; utilities</title>
	<atom:link href="http://www.quillaja.net/tag/utilities/feed" rel="self" type="application/rss+xml" />
	<link>http://www.quillaja.net</link>
	<description>Programming in WPF and Silverlight, as well as other random topics.</description>
	<lastBuildDate>Thu, 24 Jun 2010 04:36:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Batch Rename</title>
		<link>http://www.quillaja.net/applications/batch-rename</link>
		<comments>http://www.quillaja.net/applications/batch-rename#comments</comments>
		<pubDate>Thu, 15 Oct 2009 13:04:21 +0000</pubDate>
		<dc:creator>Quillaja</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[rename]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[utilities]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://www.quillaja.net/?p=46</guid>
		<description><![CDATA[Batch Rename is an easy-to-use but powerful tool to rename a folder full of sequentially ordered files.]]></description>
			<content:encoded><![CDATA[<p>Have you ever needed to rename a folder full of sequential files? Batch Rename is an easy-to-use but powerful tool to do just that. <span id="more-46"></span>This program for Windows uses a <a title="Wikipedia" href="http://en.wikipedia.org/wiki/Regular_expression" target="_blank">regular expression</a> to match and replace portions of file names. Parts of file names can be captured and re-inserted into the replacement string using .Net&#8217;s syntax. For a good cheat-sheet on .Net regex syntax, <a title="regex cheat-sheet" href="http://www.mikesdotnetting.com/Article/46/CSharp-Regular-Expressions-Cheat-Sheet" target="_blank">go here</a>.</p>
<div id="attachment_47" class="wp-caption alignright" style="width: 310px"><a href="http://www.quillaja.net/wp-content/uploads/2009/10/batchrename1.png"><img class="size-medium wp-image-47 " title="batchrename1" src="http://www.quillaja.net/wp-content/uploads/2009/10/batchrename1-300x78.png" alt="A screenshot of Batch Rename after it opens." width="300" height="78" /></a><p class="wp-caption-text">A screenshot of Batch Rename after it opens.</p></div>
<p>Upon opening, the user is presented with 3 textboxes and 3 buttons. Here, the user can enter the full path name of the folder, the regex expression to use in matching file names, and the replacement expression to rename files as. The buttons open a folder browsing window, list the files that match the current regex, and execute the rename.</p>
<div id="attachment_48" class="wp-caption alignleft" style="width: 310px"><a href="http://www.quillaja.net/wp-content/uploads/2009/10/batchrename2.png"><img class="size-medium wp-image-48 " title="batchrename2" src="http://www.quillaja.net/wp-content/uploads/2009/10/batchrename2-300x232.png" alt="A list of matching files." width="300" height="232" /></a><p class="wp-caption-text">A list of matching files.</p></div>
<p>For example, if there is a folder <code>C:\mytest</code> which contains some XHTML files named <code>text00.xhtml, text01.xhtml,...</code> and so on, using Batch Rename, they can be renamed to <code>part00.xhtml, part01.xhtml,....</code></p>
<p>The regex to use is <code>text(\d+).+</code>. Note that the numerical part of the file name is captured with <code>(\d+)</code> so it can be re-inserted into the new file name, and preserve the numerical order of the files. Also, each file must be given a new unique name, and the number will be the only unique part in this case. After entering the regex, the user can press &#8220;List Matches&#8221; to see a list of the file names which match the regex.</p>
<p>If that is satisfactory, continue and enter the replacement string. In this case, it is <code>part${1}.xhtml</code> because the regex matches all the characters in the file name and captures the numerical part in the 1st capture group. Therefore the entire file name will be replaced with the replacement string, instead of just a sub-string of the file name. <code>${}</code> is the syntax to use to refer to captured groups.</p>
<div id="attachment_49" class="wp-caption alignright" style="width: 310px"><a href="http://www.quillaja.net/wp-content/uploads/2009/10/batchrename3.png"><img class="size-medium wp-image-49 " title="batchrename3" src="http://www.quillaja.net/wp-content/uploads/2009/10/batchrename3-300x232.png" alt="The results of a batch rename." width="300" height="232" /></a><p class="wp-caption-text">The results of a batch rename.</p></div>
<p>Since everything is set up, the rename will be performed when the user presses &#8220;Run&#8221;. The results of the renaming process are shown in the output area.</p>
<p>The program checks for updates once a week.</p>
<h3>Updates</h3>
<ol>
<li>2010-01-13: The ability to run a test rename. To run a test, simply complete all the fields as normal and press &#8220;Test&#8221;. Output will appear as normal.</li>
<li>2010-01-13: Auto-numbering. To use this, insert a single <code>#</code> character in the replacement string (in addition to the standard syntax). There are options to zero-pad and to adjust the starting number. To zero-pad, increase the &#8220;Auto-numbering digit count&#8221; parameter. For example, with this set to <code>3</code>, <code>5</code> would become <code>005</code>.</li>
</ol>
<h3>Download</h3>
<ol>
<li>Version 1.0.0.1, 2010-01-13, Windows XP, Vista, 7 (.net 3.5): <a title="Download Batch Rename" href="http://www.quillaja.net/bin/batch-rename/setup.exe" target="_blank">download here</a></li>
<li>Version 1.0.0.0, 2009-10-15: Discontinued</li>
</ol>
<h3>Source code</h3>
<ol>
<li><a href="http://www.quillaja.net/wp-content/uploads/2010/01/BatchRename.zip">BatchRename 1.0.0.1</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.quillaja.net/applications/batch-rename/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
