|
回复 #1 北斗 的帖子
[fly] time.cmd内容如下 写入time.txt文件 你要做的就是把两个时间(随机时间 和 电脑时间)设置成变量 用变量设置电脑名 [/fly]
@echo off
set /a randh=%random%%%24
set /a randm=%random%%%60
if %randm% lss 10 set randm=0%randm%
for /f "delims=: tokens=1-3" %%i in ("%time:~0,-6%") do (
set time_hend=%%i
set time_mend=%%j
)
echo %randh%:%randm%>>time.txt
echo %time_hend: =%:%time_mend%>>time.txt
if %randh%:%randm%==%time_hend: =%:%time_mend% md time.txt
[ 本帖最后由 2013723280 于 2013-3-10 22:24 编辑 ] |
|