- if not "%1"=="" (
- cd /d "%1"
- if "%errorlevel%"=="0" (goto:inputparam_1_not_is_null)
- )
- echo 当前执行文件夹为:"%~dp0"
- set temp_userinput_var_a="%~dp0"
- set /p temp_userinput_var_a=拖入文件夹:
- cd /d "%temp_userinput_var_a%"
- :inputparam_1_not_is_null
复制代码 提升点易用性?随便打的,不过加了这个要考虑管理员权限导致的路径变化就是了 |