I'm trying to write batch script to create a folder if it does not already exist. Following up the online examples, below is my script.
The problem is; first pause
works, then probably due to syntax error the window closes even before reaches to the second pause
, so I can't really tell which part of my script is wrong.
Could anyone show me how to prevent closing window so that I can see what's on the window?
@echo off
:copy theme images over
:designer
echo copying theme images over...
pause
if not exist "%K2DIR%\K2 SmartForms Runtime\Styles\Themes\Sharepoint 2013\rich_text"
(
md "%K2DIR%\K2 SmartForms Runtime\Styles\Themes\Sharepoint 2013\rich_text333"
)
pause
pause
beforemd
? Also, don't just run the .bat file by doubleclicking it: opencmd
and call your bat from there. No window to close there!(
is misplaced. It must be on the same line as your IF statement with a space before it.