Hi, i have 3000 .cur files online and i need to change them all to .ani i have treid <?php rename("cursor/(.*?).cur", "cursor/(.*?).ani"); ?> but this was no success Please hlep thanks!
Wrote a quick script.. I'm sure theres a better way to do it.. I haven't tested it so TEST IT BEFORE YOU USE IT <?php set_time_limit(0); $dh = opendir("./"); while (($files = readdir($dh))) { if ($files == ".." || $files == ".") continue; if (ereg("(.*)\.cur", $files)) { echo "Renaming $files...<br />" . rename($files, substr($files, 0, -3) . "ani"); } else { continue; } } ?> PHP: **EDIT** Added no time limit.. if 3000 files might hit 30 seconds.. not sure.