Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. @echo off
  2.  
  3. for %%F in ("%~dp0..*.wgm") do (
  4. set "file=%%~nxF"
  5. move "%%F" "%cd%" >nul
  6. goto :next
  7. )
  8. :next
  9.  
  10. if not exist %cd%output md output
  11. if not exist %cd%temp md temp
  12.  
  13. echo File "%file%" was moved from "%~dp0.." to "%cd%" && move "*.wgm" "%cd%"
  14.  
  15. for /d %%i in ("%cd%") do ( cd "%%i" ) && for %%i in (*.wgm) do tool.exe *.wgm "%%~ni".dat "643054977005802"
  16.  
  17. move "%cd%*.wgm" temp
  18. move "%cd%*.dat" output
  19.  
  20. if exist %~dp0..*.wgm call example.bat
  21. if not exist %~dp0..*.wgm goto :last
  22.  
  23. :last
  24. for /r %%x in (*.dat) do ren "%%x" *.wgm
  25. move "%cd%temp*.wgm" %~dp0.. && rmdir /s /q "%cd%temp"
  26.  
  27. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement