bat--批处理判断文件夹是否存在

来源:百度知道 编辑:UC知道 时间:2024/06/27 17:58:05
文件夹名:1. (后面有个点,这种文件夹删除不掉)
判断文件夹是否存在,如果存在就 goto :s
不存在就运行a.txt

@echo off
dir /ad/x |find /i "1E213~1"&&goto :s||start "" a.txt
goto end
:s
echo 存在
:end
pause

另外提醒你一下这种文件夹是删除的掉的
rd /s/q "1..\"
打开这种文件夹
start "" "1..\"