CODE: [Copy to clipboard]@echo off set /p str=请输入你的路径: cd "%str%">nul 2>nul if "%errorlevel%" equ "0" ( echo 路径 ) else ( echo 文件 )