Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $todo='';
- dodir(getcwd());
- echo $todo;
- file_put_contents('doncw.bat',$todo);
- function dodir($dirname){
- global $todo;
- $files=array_diff(scandir($dirname), array('..', '.'));
- $has_wav=0;
- $has_ncw=0;
- foreach($files as $file){
- if(is_dir($dirname.'\\'.$file)){
- dodir($dirname.'\\'.$file);
- }else{
- $filesplits=explode('.',$file);
- $fext='';
- foreach($filesplits as $filesplit){
- $fext=$filesplit;
- }
- if(strtolower($fext)=='ncw'){
- $has_ncw=1;
- }
- if(strtolower($fext)=='wav'){
- $has_wav=1;
- }
- }
- }
- if($has_ncw && !$has_wav){
- $todo.="C:\\conNCW04.exe -n2w \"$dirname\"\n";
- $todo.="del \"$dirname\\*.ncw\"\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement