<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Bulk rename files</title>
	<atom:link href="http://www.manojganesan.com/2008/01/31/bulk-rename-files/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.manojganesan.com/2008/01/31/bulk-rename-files/</link>
	<description>It is no use to keep private information which you can't show off - Mark Twain</description>
	<lastBuildDate>Fri, 29 Apr 2011 18:25:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ashwin</title>
		<link>http://www.manojganesan.com/2008/01/31/bulk-rename-files/comment-page-1/#comment-40</link>
		<dc:creator>Ashwin</dc:creator>
		<pubDate>Mon, 11 Feb 2008 23:53:01 +0000</pubDate>
		<guid isPermaLink="false">http://monesblog.wordpress.com/?p=44#comment-40</guid>
		<description>And here I was thinking I dont have work....:)</description>
		<content:encoded><![CDATA[<p>And here I was thinking I dont have work&#8230;.:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vineet</title>
		<link>http://www.manojganesan.com/2008/01/31/bulk-rename-files/comment-page-1/#comment-39</link>
		<dc:creator>Vineet</dc:creator>
		<pubDate>Sat, 09 Feb 2008 03:32:15 +0000</pubDate>
		<guid isPermaLink="false">http://monesblog.wordpress.com/?p=44#comment-39</guid>
		<description>hmm..my script doesn&#039;t take regex args..aaah too lazy to work it out..</description>
		<content:encoded><![CDATA[<p>hmm..my script doesn&#8217;t take regex args..aaah too lazy to work it out..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vineet</title>
		<link>http://www.manojganesan.com/2008/01/31/bulk-rename-files/comment-page-1/#comment-38</link>
		<dc:creator>Vineet</dc:creator>
		<pubDate>Sat, 09 Feb 2008 03:10:20 +0000</pubDate>
		<guid isPermaLink="false">http://monesblog.wordpress.com/?p=44#comment-38</guid>
		<description>Anything with files...perl rules .. :)</description>
		<content:encoded><![CDATA[<p>Anything with files&#8230;perl rules .. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vineet</title>
		<link>http://www.manojganesan.com/2008/01/31/bulk-rename-files/comment-page-1/#comment-37</link>
		<dc:creator>Vineet</dc:creator>
		<pubDate>Sat, 09 Feb 2008 03:09:33 +0000</pubDate>
		<guid isPermaLink="false">http://monesblog.wordpress.com/?p=44#comment-37</guid>
		<description>$args = $#ARGV + 1;
if($args &lt; 2)
{
        print &quot;USAGE: &quot;,$0,&quot;  &quot;,&quot;\n&quot;;
        exit();
}

use Cwd;
my $dir = getcwd();
opendir MYDIR, $dir;
@contents = readdir MYDIR;
foreach $file (@contents)
{
        $name = $file;
        if($name =~ m/(.*)($ARGV[0])(.*)\.($ARGV[1])$/)
        {
                print &quot;Found match!\n&quot;;
                if(defined($1)) {$name=$1;}
                if(defined($2)) {$name .= $3;}
                $name .= &quot;.&quot;.($ARGV[1]);
                rename($file,$name);
                print &quot;Renamed &quot;,$file,&quot; to &quot;,$name,&quot;\n&quot;;
        }
}
closedir MYDIR;</description>
		<content:encoded><![CDATA[<p>$args = $#ARGV + 1;<br />
if($args &lt; 2)<br />
{<br />
        print &#8220;USAGE: &#8220;,$0,&#8221;  &#8220;,&#8221;\n&#8221;;<br />
        exit();<br />
}</p>
<p>use Cwd;<br />
my $dir = getcwd();<br />
opendir MYDIR, $dir;<br />
@contents = readdir MYDIR;<br />
foreach $file (@contents)<br />
{<br />
        $name = $file;<br />
        if($name =~ m/(.*)($ARGV[0])(.*)\.($ARGV[1])$/)<br />
        {<br />
                print &#8220;Found match!\n&#8221;;<br />
                if(defined($1)) {$name=$1;}<br />
                if(defined($2)) {$name .= $3;}<br />
                $name .= &#8220;.&#8221;.($ARGV[1]);<br />
                rename($file,$name);<br />
                print &#8220;Renamed &#8220;,$file,&#8221; to &#8220;,$name,&#8221;\n&#8221;;<br />
        }<br />
}<br />
closedir MYDIR;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

