|
[求助]如何获取当前路径到一环境变量中?
好吧,这就是get.bat的内容。我未作任何修改。::getvar.bat
@if [%2]==[] goto help
@if [%1]==[/?] goto help
@if [%1]==[/h] goto help
@if [%1]==[invoke] prompt set %2=%3$_
@if [%1]==[invoke] goto end
@if [%temp%]==[] set temp=c:
@%comspec% /c %0 invoke %1 $%2>%TEMP%\tt.bat
@echo off
call %TEMP%\tt.bat
if "%3"=="" DEL %TEMP%\tt.bat
set CMDLINE=
goto end
:help
@echo off
echo.
echo GET.BAT V1.0 Lydong 030625
echo ===============================
echo get curver [Command]
echo get [/?] or [/h]
echo.
echo eg: get time t
echo get dosver v
echo.
echo Command:
echo T Current time
echo D Current date
echo P Current drive and path
echo V Windows version number
echo N Current drive
echo ===============================
echo.
:end |
|