$cleandirout)\n"; $filez = scandir ($dirname); foreach ($filez as $file) { if ( ($file == ".") || ($file=="..")) continue; //echo $file; $filePath = "${dirname}/${file}"; if (preg_match ("/(.*?)\.wma$/",$file,$arr)) { $wmain = $filePath; $fwe = $arr[1]; $mp3out= "${cleandirout}/${fwe}.mp3"; echo "Processing wma [${wmain}]\n"; if (!file_exists ($cleandirout)){ mkdir ($cleandirout,0777,true); } if (file_exists ($mp3out)) continue; system ("ffmpeg -i \"${wmain}\" -ar 44100 -ab 128k \"${mp3out}\"\n"); } if (is_dir ($filePath)){ doDir ($dirname."/".$file); } } } doDir ($baseDir); ?>