Explorar o código

add createdir

Johann ELSASS %!s(int64=4) %!d(string=hai) anos
pai
achega
34e5d99e49
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  1. 12 0
      winmake/createdir.bat

+ 12 - 0
winmake/createdir.bat

@@ -0,0 +1,12 @@
+@echo off
+if "%~1" == "" goto argument
+setlocal
+set DIRNAME=%~1
+set DIRNAME=%DIRNAME:/=\%
+if not exist "%DIRNAME%\" mkdir "%DIRNAME%"
+exit /b 0
+
+:argument
+echo Creates a directory if it doesn't exist.
+echo Usage: createdir [DIRNAME]
+exit /b 1