I have this code block:
我有这个代码块:
@echo off
for %%d in (c d e f g h i j k l m n o p q r s t u v w x y z) do (
if exist "%%d:\Program Files (x86)\" (
cd /d "%%d:\Program Files (x86)\"
) else (
cd /d "%%d:\Folder\subfolder" 2>nul && goto :break
)
)
:break
if %errorlevel% equ 0 (
echo "Success, CDing to file location"
) else (
echo FAILURE
)
@echo off