CODE: [Copy to clipboard]::获取路径 set t=c:\program files\grd cd /d "%t%" for /f "delims=*" %%a in ('dir /a /b /s grdad.exe') do echo %%~dpa