一、用法
1、time
用法介绍:
用于显示时间以及重设时间。
@echo off
echo method 1
TIME
pause
现象:
2、time /t
用法介绍:
以简洁方式显示时间。
@echo off
@REM echo method 1
@REM TIME
echo method 2
TIME /t
pause
现象:
3、time 12:34:56
用法介绍:
更改系统时间为12:34:56。
@echo off
@REM echo method 1
@REM TIME
@REM echo method 2
@REM TIME /t
echo method 3
TIME 12:34:56
pause
现象:
4、time /t > time.txt
用法介绍:
将当前系统时间输出到名为time.txt的文件中。
@echo off
@REM echo method 1
@REM TIME
@REM echo method 2
@REM TIME /t
@REM echo method 3
@REM TIME 12:34:56
echo method 4
TIME /t > TIME.txt
pause
现象: