Rename all files in a directory with numbers
<p>I was wondering if anyone could help me write a PHP script for me that renames all the files in a directory in a sequence. </p>

<p>So... </p>

<ul>
<li>DSC_10342.JPG -> 1.JPG</li>
<li>DSC_10343.JPG -> 2.JPG</li>
<li><p>DSC_10344.JPG -> 3.JPG</p>

<p>and so on.</p></li>
</ul>
