Well, you'd probably want to search for an easy recursive function to iterate over directories... then when iterating through the files, you'd want to rename them:
<?php
function renameSubfiles($dir, $recursive=true)
{
$d = dir($dir);
while(false !== ($entry = $d->read()))
{
if($entry != '.' && $entry != '..')
{
$entry2 = $dir.'/'.$entry;
if(is_dir($entry2) && $recursive)
{
renameSubfiles($entry2);
}
else
{
$search = array(' ', 'Ş', 'İ'); // What you want replaced
$replace = array('', 'S', 'I'); // What you want each replaced with
$new = str_replace($search, $replace, $entry);
$fullentry = $dir.'/'.$new;
if(rename($entry2, $fullentry) == false)
echo 'Renaming of file (<em>' . $entry2 . '</em>) failed.';
else
echo 'Renaming of file (<em>' . $entry2 . '</em>) succeeded.';
}
}
}
}
renameSubfiles('C:/Music');
?>
Hope that helps. It may not work 100%, but it should get you going. If you have more characters you want to replace, you'd just fill the arrays with your replacements... Each $search element MUST HAVE a $replace element. Each element in the arrays match up with the other, so all spaces are removed, all İ change into I and all Ş turn into S right now. You can add as you need.