//Вариант 1
foreach ($files as $file) {
$newname = iconv('Windows-1251', 'UTF-8', $file);
rename($path.$file, $path.$newname);
}
//Вариант 2
foreach ($files as $file) {
$newname = mb_convert_encoding($file, "utf-8", "windows-1251");
rename($path.$file, $path.$newname);
}