SET BATDIR=%~dp0
PUSHD %BATDIR%..
SET TOPDIR=%cd%
POPD

SET AUTODIR=%TOPDIR%\#AUTODIR
SET IMGDIR=%TOPDIR%\#IMGDIR
SET LOGDIR=%TOPDIR%\#LOGDIR
SET STATUSDIR=%TOPDIR%\#STATUSDIR
SET SHAREDIR=%TOPDIR%
SET TOOLSDIR=%TOPDIR%\tools

ECHO %time% Creating directories (if needed)
IF NOT EXIST %AUTODIR% mkdir %AUTODIR%
IF NOT EXIST %IMGDIR% mkdir %IMGDIR%
IF NOT EXIST %LOGDIR% mkdir %LOGDIR%
IF NOT EXIST %SHAREDIR% mkdir %SHAREDIR%

REM vim: set ai ts=4 sw=4 et ft=dosbatch:

