无法在批处理文件中检查目录是否存在

时间:2018-03-23 09:56:19

标签: batch-file command-line windows-8.1

这里我连接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 )

0 个答案:

没有答案
相关问题