Rename Files in a Directory
<p>I have 400 files in a directory (with <code>.png</code> extensions). They start with the name <code>005.png</code> and go up to <code>395.png</code>.</p>

<p>I want to rename them using <code>os.rename</code>:</p>

<pre><code>os.rename(006.png,005.png)
</code></pre>

<p>In other words, I want to shift all the numbers down one, renaming the file <code>005.png</code> to <code>004.png</code> and renaming <code>395.png</code> to <code>394.png</code>, and so on.</p>

<p>I don't want to do this manually, because it would take too long:</p>

<pre><code>os.rename(005.png,004.png)
os.rename(006.png,005.png)
...
</code></pre>

<p>How can I do this simply? I am using the s60 2nd edition FP3.</p>

<p>Thanks in advance!</p>
