Here I am concatenating 2 variables to check whether a particular directory exists or not, i don't know what is missing here, pl help.
set MyFolder=\\192.108.10.10\Backup
echo.
for /f %%a in ('sqlcmd -S %SqlServer% -U %Username% -P %Password% -Q "SET NOCOUNT ON select ltrim(convert(date, getdate()))" -h -1') do set CurrentDate=%%a
echo.
echo %NetworkFolder2%\%CurrentDate%
IF exist %MyFolder%\%CurrentDate%( echo yes ) ELSE ( echo no )