Advertisement
Guest User

d.bat

a guest
Feb 21st, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.85 KB | None | 0 0
  1. @echo off
  2.  
  3. :start
  4. if "%1" == "" goto end
  5. if "%1" == "/?" goto help
  6. if "%1" == "/t" goto create
  7. if "%1" == "/u" goto remove
  8. shift
  9. goto start
  10.  
  11. :create
  12. shift
  13. if "%1" == "" goto end
  14. if exist %1 goto crtExst
  15. if not exist %1 goto crtNotExst
  16.  
  17. :crtExst
  18. echo Folder [%1] Istnieje
  19. goto create
  20.  
  21. :crtNotExst
  22. echo Tworzenie folderu [%1]
  23. md %1
  24. goto create
  25.  
  26. :remove
  27. shift
  28. if "%1" == "" goto end
  29. if not exist "%1" goto rmNotExst
  30. echo Usuwanie folderu [%1]
  31. rd /S /Q %1
  32. goto remove
  33.  
  34. :rmNotExst
  35. echo Folder [%1] nie istnieje
  36. goto remove
  37.  
  38. :help
  39. echo ===================================================
  40. echo === Uzycie:                                     ===
  41. echo ===   /t [lista folderow] tworzy podane foldery ===
  42. echo ===   /u [lista folderow] usuwa podane foldery  ===
  43. echo ===================================================
  44.  
  45. :end
  46. echo koniec
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement