I am trying to make a button with the following commands:
:: DATE SETTINGS
@ECHO off
SETLOCAL ENABLEEXTENSIONS
if "%date%A" LSS "A" (set toks=1-3) else (set toks=2-4)
for /f "tokens=2-4 delims=(-)" %%a in ('echo:^|date') do (
for /f "tokens=%toks% delims=.-/ " %%i in ('date/t') do (
set '%%a'=%%i
set '%%b'=%%j
set '%%c'=%%k))
if %'yy'% LSS 100 set 'yy'=20%'yy'%
set Today=%'yy'%-%'mm'%-%'dd'%
ENDLOCAL & SET v_year=%'yy'%& SET v_month=%'mm'%& SET v_day=%'dd'%
:: ECHO Today is Year: [%V_Year%] Month: [%V_Month%] Day: [%V_Day%]
::------------------------------------------------------------------------------------------------
::AskForFolderName
set /p NewFolder=Enter folder name here:
If [%NewFolder%]==[] Goto AskForFolderName
If Exist "%NewFolder%" (
Echo Folder already exists
Echo.
Goto AskForFolderName
)
::------------------------------------------------------------------------------------------------
MD "%V_Year%.%V_Month%.%V_Day% - %NewFolder%\IMAGES\RAW IMAGES"
MD "%V_Year%.%V_Month%.%V_Day% - %NewFolder%\IMAGES\EXPORTS\JPG"
MD "%V_Year%.%V_Month%.%V_Day% - %NewFolder%\IMAGES\EXPORTS\PNG"
MD "%V_Year%.%V_Month%.%V_Day% - %NewFolder%\IMAGES\EXPORTS\PSD"
MD "%V_Year%.%V_Month%.%V_Day% - %NewFolder%\VIDEO\RAW VIDEO"
MD "%V_Year%.%V_Month%.%V_Day% - %NewFolder%\VIDEO\EDITS"
MD "%V_Year%.%V_Month%.%V_Day% - %NewFolder%\VIDEO\EXPORTS"
If I paste the commands in the button and run it all I get is the command prompt flashing once and then closes. As far as I know Dopus allows MSDOS batch syntax so I really don't know what is wrong here. If I paste the same commands in CMD or a batch file it works fine. Please help me out here.
