createdir.bat 242 B

123456789101112
  1. @echo off
  2. if "%~1" == "" goto argument
  3. setlocal
  4. set DIRNAME=%~1
  5. set DIRNAME=%DIRNAME:/=\%
  6. if not exist "%DIRNAME%\" mkdir "%DIRNAME%"
  7. exit /b 0
  8. :argument
  9. echo Creates a directory if it doesn't exist.
  10. echo Usage: createdir [DIRNAME]
  11. exit /b 1