Advertisement
Guest User

Untitled

a guest
Nov 25th, 2024
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | Source Code | 0 0
  1. <?php
  2.  
  3. $todo='';
  4. dodir(getcwd());
  5.  
  6. echo $todo;
  7. file_put_contents('doncw.bat',$todo);
  8.  
  9. function dodir($dirname){
  10. global $todo;
  11. $files=array_diff(scandir($dirname), array('..', '.'));
  12.  
  13. $has_wav=0;
  14. $has_ncw=0;
  15.  
  16. foreach($files as $file){
  17. if(is_dir($dirname.'\\'.$file)){
  18. dodir($dirname.'\\'.$file);
  19. }else{
  20. $filesplits=explode('.',$file);
  21.  
  22. $fext='';
  23. foreach($filesplits as $filesplit){
  24. $fext=$filesplit;
  25. }
  26.  
  27.  
  28. if(strtolower($fext)=='ncw'){
  29. $has_ncw=1;
  30. }
  31. if(strtolower($fext)=='wav'){
  32. $has_wav=1;
  33. }
  34. }
  35. }
  36. if($has_ncw && !$has_wav){
  37. $todo.="C:\\conNCW04.exe -n2w \"$dirname\"\n";
  38. $todo.="del \"$dirname\\*.ncw\"\n";
  39. }
  40. }
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement