|  | 
3#
 
 
 楼主|
发表于 2006-12-30 10:56:25
|
只看该作者 
| GetInfo.COM [/T] [/C] [/D:+|-days] [/G:n,filename]       ver 1.2 
 =====================================================
 版本 1.2 更新日期:2005-10-16
 
 功能介绍:
 
 [/Cmp:x,y]
 比较两个数,并返回一个数值
 x=y  return 0
 x<y  return 1
 x>y  return 2
 
 例子:
 
 
 比较12和13,并显示结果
 @echo off
 getinfo /cmp:12,13
 if errorlevel 2 goto big
 if errorlevel 1 goto small
 if errorlevel 0 goto equ
 goto end
 
 :big
 echo x bigger than y
 goto end
 
 :small
 echo x smaller than y
 goto end
 
 :equ
 echo x = y
 
 :end
 
 
 判断今天的日期是否跟设定的日期相同
 @echo off
 getinfo /t
 set today=%Year%%Mon%%Day%
 getinfo /cmp:%today%,20051016
 if errorlevel 2 goto big
 if errorlevel 1 goto small
 if errorlevel 0 goto equ
 goto end
 
 :big
 echo 已过了设定的日期
 goto end
 
 :small
 echo 还没有到设定的日期
 goto end
 
 :equ
 echo 今天就是设定的日期
 
 :end
 
 
 
 
 ............................
 | 
 |