
CODE: [Copy to clipboard]注意:如果最后一行包含有 &,&&,||等特殊字符的话,可能会显示错误。建议先用set a=%a:&=^^^&%等语句把特殊字符转换一下。@echo off
@set VERSIONFILE=C:\program files\utility\version.txt
@for /f "usebackq delims=" %%a in ("%VERSIONFILE%") do set a=%%a
@echo.%a%
CODE: [Copy to clipboard]@echo off
call :GetPath
echo 你输入的路径为:%strPath%
pause>nul
exit
:GetPath
set /p strPath=please input the path:
pushd %strPath% 2>nul || (echo The Path specified is invalid, please input it again: & goto GetPath)
popd
goto :eof
CODE: [Copy to clipboard]wmic datafile where "filename='autoexec' and Extension='bat'" get drive,path
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |