<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

      <title>Comments on: Renaming numbered files in OSX incrementally </title>
      <link>http://ask.metafilter.com/63325/Renaming-numbered-files-in-OSX-incrementally/</link>
      <description>Comments on Ask MetaFilter post Renaming numbered files in OSX incrementally</description>
	  	  <pubDate>Thu, 24 May 2007 10:49:37 -0800</pubDate>
      <lastBuildDate>Thu, 24 May 2007 10:49:37 -0800</lastBuildDate>
      <language>en-us</language>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <ttl>60</ttl>

<item>
  	<title>Question: Renaming numbered files in OSX incrementally </title>
  	<link>http://ask.metafilter.com/63325/Renaming-numbered-files-in-OSX-incrementally</link>	
  	<description>Renaming numbered files in OSX incrementally  &lt;br /&gt;&lt;br /&gt; I have several hundred files that are alll named with the following convention: ABC5000.jpg.  I&apos;m looking for a way in OS X to rename groups of these files by increasing the numerical portion of the file name by one, ie, ABC5000.jpg becomes ABC5001.jpg. &lt;br&gt;
&lt;br&gt;
I know that automator has a &apos;make sequential&apos; feature in the rename filies applet, but that seems to only offer the option to add numbers, not change the ones that are already appended.&lt;br&gt;
&lt;br&gt;
Thanks for any suggestions.  I&apos;m willing to buy software if needed.</description>
  	<guid isPermaLink="false">post:ask.metafilter.com,2008:site.63325</guid>
  	<pubDate>Thu, 24 May 2007 10:31:03 -0800</pubDate>
  	<dc:creator>bcnarc</dc:creator>
	
	<category>renamefiles</category>
	
	<category>osx</category>
	
	<category>increment</category>
	
</item>
<item>
  	<title>By: dance</title>
  	<link>http://ask.metafilter.com/63325/Renaming-numbered-files-in-OSX-incrementally#952941</link>	
  	<description>I&apos; m pretty sure &apos;&lt;a href=&quot;http://publicspace.net/ABetterFinderRename/&quot;&gt;A better finder rename&lt;/a&gt;&apos; can do this for you.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63325-952941</guid>
  	<pubDate>Thu, 24 May 2007 10:49:37 -0800</pubDate>
  	<dc:creator>dance</dc:creator>
</item>
<item>
  	<title>By: jozxyqk</title>
  	<link>http://ask.metafilter.com/63325/Renaming-numbered-files-in-OSX-incrementally#952949</link>	
  	<description>You can get Perl on OSX, right?&lt;br&gt;
Here&apos;s a quick and dirty perl one-liner that should do it:&lt;br&gt;
&lt;code&gt;perl -e &apos;for (sort { $b ne $a } &amp;lt;ABC*.jpg&amp;gt;) { ($n) = /([^\.]+)/; $n++; rename $_,&amp;quot;$n.jpg&amp;quot;; }&apos;&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
Just replace the &amp;quot;ABC*.jpg&amp;quot; part with some file wildcard that meets your needs (and replace the second .jpg if you have to also).&lt;br&gt;
&lt;br&gt;
(You may want to test with some destroyable files first).</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63325-952949</guid>
  	<pubDate>Thu, 24 May 2007 10:56:03 -0800</pubDate>
  	<dc:creator>jozxyqk</dc:creator>
</item>
<item>
  	<title>By: bcnarc</title>
  	<link>http://ask.metafilter.com/63325/Renaming-numbered-files-in-OSX-incrementally#953048</link>	
  	<description>Corky Romano figured it out!  The solution is to use automator&apos;s &apos;make sequential&apos; feature and create new file names all together. After specifying the text prefix and a starting number the new sequential names will then have the corrected names. &lt;br&gt;
&lt;br&gt;
Thanks for the other answers too.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63325-953048</guid>
  	<pubDate>Thu, 24 May 2007 12:09:03 -0800</pubDate>
  	<dc:creator>bcnarc</dc:creator>
</item>
<item>
  	<title>By: The Bellman</title>
  	<link>http://ask.metafilter.com/63325/Renaming-numbered-files-in-OSX-incrementally#953072</link>	
  	<description>jozxyqk should get a checkmark. His or her solution is lovely and geeky and one-line long and right and in perl and makes me all happy inside.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63325-953072</guid>
  	<pubDate>Thu, 24 May 2007 12:23:20 -0800</pubDate>
  	<dc:creator>The Bellman</dc:creator>
</item>
<item>
  	<title>By: macrone</title>
  	<link>http://ask.metafilter.com/63325/Renaming-numbered-files-in-OSX-incrementally#953329</link>	
  	<description>jozxyqk&apos;s solution is nice, but doesn&apos;t&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;code&gt;($n) = /([^\.]+)/; $n++; rename $_,&amp;quot;$n.jpg&amp;quot;;&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
initially set $n to something like &amp;quot;ABC5000,&amp;quot; which isn&apos;t  an integer? Would incrementing a string just return 1? Even if it captured just the numeric part of the file name, the leading &apos;ABC&apos; isn&apos;t included in the renamed file.&lt;br&gt;
&lt;br&gt;
(Also, dots don&apos;t need to be escaped inside a character class; [^.] should work fine.)&lt;br&gt;
&lt;br&gt;
Perhaps this is better?&lt;br&gt;
&lt;xmp&gt;($n) = /^ABC(\d+)/; $n++; rename $_,&amp;quot;ABC$n.jpg&amp;quot;;&lt;/xmp&gt;</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63325-953329</guid>
  	<pubDate>Thu, 24 May 2007 15:31:09 -0800</pubDate>
  	<dc:creator>macrone</dc:creator>
</item>
<item>
  	<title>By: macrone</title>
  	<link>http://ask.metafilter.com/63325/Renaming-numbered-files-in-OSX-incrementally#953330</link>	
  	<description>Aargh. Sorry for the entites in the rewritten code. Here it is again:&lt;br&gt;
&lt;br&gt;
($n) = /^ABC(\d+)/; $n++; rename $_,&amp;quot;ABC$n.jpg&amp;quot;;</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63325-953330</guid>
  	<pubDate>Thu, 24 May 2007 15:32:22 -0800</pubDate>
  	<dc:creator>macrone</dc:creator>
</item>
<item>
  	<title>By: ardgedee</title>
  	<link>http://ask.metafilter.com/63325/Renaming-numbered-files-in-OSX-incrementally#953334</link>	
  	<description>The freeware &lt;a href=&quot;http://www.tulip.sannet.ne.jp/tayo/&quot;&gt;R-Name&lt;/a&gt; does this and many other file renaming tasks. You can preview the name changes before you commit. It&apos;s a vital tool in my toolbox.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63325-953334</guid>
  	<pubDate>Thu, 24 May 2007 15:36:21 -0800</pubDate>
  	<dc:creator>ardgedee</dc:creator>
</item>
<item>
  	<title>By: aneel</title>
  	<link>http://ask.metafilter.com/63325/Renaming-numbered-files-in-OSX-incrementally#953660</link>	
  	<description>macrone, perl&apos;s ++ is magic:&lt;br&gt;
&lt;code&gt;$ perl -e &apos;$a = &amp;quot;ABC1234&amp;quot;; print ++$a . &amp;quot;\n&amp;quot;&apos;&lt;br&gt;
ABC1235&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://perldoc.perl.org/perlop.html#Auto-increment-and-Auto-decrement-increment-auto-increment-%2b%2b-decrement-auto-decrement---&quot;&gt;See here for more detail&lt;/a&gt;</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63325-953660</guid>
  	<pubDate>Thu, 24 May 2007 23:49:01 -0800</pubDate>
  	<dc:creator>aneel</dc:creator>
</item>
<item>
  	<title>By: Ajit AP</title>
  	<link>http://ask.metafilter.com/63325/Renaming-numbered-files-in-OSX-incrementally#953842</link>	
  	<description>Rename4Mac is what I use:&lt;br&gt;
http://www.power4mac.com/renamer/</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63325-953842</guid>
  	<pubDate>Fri, 25 May 2007 06:48:07 -0800</pubDate>
  	<dc:creator>Ajit AP</dc:creator>
</item>

    </channel>
</rss>
