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-08-02 04:42
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] Problem of restoring the correct date after modifying the system date View 1,540 Replies 2
Original Poster Posted 2006-09-21 06:31 ·  中国 上海 静安区 电信
新手上路
Credits 16
Posts 5
Joined 2006-09-20 08:56
19-year member
UID 63158
Status Offline
Hello everyone! Please help take a look, thank you!

date 2000-01-01 Date adjustment

........

date Current date Restore the current date when the script is executed

Because the current date changes, so I want to have such a batch script to automatically restore the current date when the script is executed.
Floor 2 Posted 2006-09-21 08:07 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
set dt=%date%
...do something
date %dt%

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 3 Posted 2006-09-21 08:59 ·  中国 上海 静安区 电信
新手上路
Credits 16
Posts 5
Joined 2006-09-20 08:56
19-year member
UID 63158
Status Offline
Originally posted by electronixtar at 2006-9-21 08:07:
set dt=%date%
...do something
date %dt%


Thanks!
Forum Jump: