/ Published in: PHP
This snippet is just an upgrade to the "http://snipplr.com/view/7396/php-file-extension-case-changer/" code. This particular code works on image files... although you can just change this line [if (preg_match("/(jpg|gif|png|bmp)/",$ext)) ] to target a specific filetype. ciao! hope this piece of code can help you as it has helped me. :)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $root = $_GET['root']; $z=0; $x=0; $z++; } else { $newfile = $filename.$ext; echo $ext."\n"; $x++; } } } echo "$x image files renamed. $z Thumbs.db files deleted."; ?>