Gfy

SRS_in_all_folders.bat

Gfy
Oct 11th, 2011
132
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @ECHO OFF
  2. goto start
  3.  
  4. :srs
  5. SET gx=%1
  6. srs %gx% > %gx%.txt
  7. IF EXIST "%gx:~0,-4%.srs" del %gx%.txt
  8. cd..
  9. goto end
  10.  
  11. :run
  12. SET gx=%1
  13. echo %gx%
  14. cd %gx%
  15. FOR /F "usebackq tokens=*" %%G IN (`dir /B *.avi *.mkv`) DO CALL :srs %%G
  16. goto end
  17.  
  18. :start
  19. FOR /F "usebackq tokens=*" %%G IN (`dir /A:D /B`) DO CALL :run %%G
  20.  
  21. :end
  22.  
  23.  
  24. ========================================================================================
  25.  
  26. @ECHO OFF
  27. goto start
  28.  
  29. :srs
  30. SET gx=%1
  31. SET onlyfile=%gx:~1,-5%
  32. SET extension=%gx:~-4,-1%
  33. echo %gx%
  34. echo %onlyfile%
  35. echo %extension%
  36. echo %onlyfile%.%extension%.txt
  37. srs %gx% > %onlyfile%.%extension%.txt
  38. IF EXIST %onlyfile%.srs del "%onlyfile%.%extension%.txt"
  39. goto end
  40.  
  41. :run
  42. SET gx=%1
  43. echo %gx%
  44. cd %gx%
  45. FOR /F "usebackq tokens=*" %%G IN (`dir /B *.avi *.mkv`) DO CALL :srs "%%G"
  46. cd..
  47. goto end
  48.  
  49. :start
  50. FOR /F "usebackq tokens=*" %%G IN (`dir /A:D /B`) DO CALL :run %%G
  51.  
  52. :end
  53.  
  54. ========================================================================================
  55.  
  56. @ECHO OFF
  57. goto start
  58. pause
  59.  
  60. :srs
  61. SET gx=%1
  62. SET filename=%gx:~1,-5%
  63. SET extension=%gx:~-4,-1%
  64. FOR %%T in (%gx%) DO SET path=%%~pT
  65. C:\WINDOWS\system32\srs.exe %gx% -o %path% > "%filename%.%extension%.txt"
  66. IF EXIST "%filename%.srs" del "%filename%.%extension%.txt"
  67. echo Done %gx%
  68. goto end
  69.  
  70. :start
  71. FOR /F "usebackq tokens=*" %%G IN (`dir /A:-D /B /S *.avi *.mkv`) DO CALL :srs "%%G"
  72.  
  73. :end
RAW Paste Data