Advertisement
Guest User

Untitled

a guest
Nov 12th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. @echo off
  2. if "%1"=="/?" (
  3. echo Usage: %0 "directory"
  4. exit /B
  5. )
  6. if "%1"=="" (
  7. echo Error!
  8. echo Usage: %0 "directory"
  9. echo Usage: %0 "/?"
  10. echo Usage: %0 "help"
  11. exit /B
  12. )
  13. if "%1"=="help" (
  14. echo This programm converts each file in folders and subfolders to cp866 encode
  15. exit /B rem что это делает
  16. ) else (
  17. if exist "%1" (
  18. for /r %1 %%f in (*.txt) do (
  19. iconv -f cp866 -t utf-8 "%%f" > %%f-utf-8
  20. type %%f-utf-8 > %%f
  21. del /f %%f-utf-8
  22. )
  23. ) else (
  24. echo Directory does not exist
  25. )
  26. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement