China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-23 02:51
中国DOS联盟论坛 » DOS启动盘 & LOGO技术 (启动盘室) » Store the current time, date, version number, etc. in environment variables View 784 Replies 0
Original Poster Posted 2003-06-26 00:00 ·  中国 广东 广州 增城区 电信
元老会员
★★★
Credits 1,468
Posts 407
Joined 2002-10-21 00:00
23-year member
UID 34
Gender Male
From 广州
Status Offline
This file was posted by MYS before; I only made a few minor changes. It can store the current time, date, drive letter, path, version number, etc. in environment variables, and it's also very convenient to use. You only need to save the following content as GET.BAT to use it. Enter GET directly to view the help information.

----------------
::get.bat
@if == goto help
@if == goto help
@if == goto help
@if == prompt set %2=%3$_
@if == goto end
@if == 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
echo get or
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
欢迎大家观临我的个人主页:

http://dosdiy.bluepc.com.cn/
http://dosdiy.ys168.com/


EMAIL: lydong@china.com.cn lydong@yeah.net
----------------------------------------------
Forum Jump: