这里我连接2个变量以检查特定目录是否存在,我不知道这里缺少什么,pl帮助。
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 )