如何在执行cmd命令同时在窗口中动态显示已用时间
2个回答
展开全部
1
@echo off
set kssj=%time%
cmd /k mongodump -h <a href="https://www.baidu.com/s?wd=127.0.0.1&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YznWw-uH9-rjP-njRsnvN-0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHRknjTknHfzrjcvrjDYPjnYn0" target="_blank" class="baidu-highlight">127.0.0.1</a>拿族源 -d world -c brook -o D:\mongobachup
set jssj=%time%
set jshaomiao=%jssj:~9,2%
set jsmiao=%jssj:~6,2%
set jsfen=%jssj:~3,2%
set jsshi=%jssj:~0,2%
set/a hmjg=%jshaomiao%-%kssj:~9,2%
if %hmjg% lss 0 set/a hmjg=100+%hmjg%&set/a jsmiao=%jsmiao%-1
set/a miaojg=%jsmiao%-%kssj:~6,2%
if %miaojg% lss 0 set/a miaojg=60+%miaojg%&set/a jsfen=%jsfen%-1
set/a fenjg=%jsfen%-%kssj:~3,2%
if %fenjg% lss 0 set/a fenjg=%fenjg%+60&set/a jsshi=%jsshi%-1
set/a shijg=%jsshi%-%kssj:~0,2%
if %shijg% lss 0 set/a shijg=0-%shijg%
cls
echo 计时开始时间消态:%kssj%
echo 计时结束时间:%jssj%
echo _______________________________________________________________________________
echo 用时穗如:%shijg%时%fenjg%分%miaojg%.%hmjg%秒
pause
@echo off
set kssj=%time%
cmd /k mongodump -h <a href="https://www.baidu.com/s?wd=127.0.0.1&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YznWw-uH9-rjP-njRsnvN-0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHRknjTknHfzrjcvrjDYPjnYn0" target="_blank" class="baidu-highlight">127.0.0.1</a>拿族源 -d world -c brook -o D:\mongobachup
set jssj=%time%
set jshaomiao=%jssj:~9,2%
set jsmiao=%jssj:~6,2%
set jsfen=%jssj:~3,2%
set jsshi=%jssj:~0,2%
set/a hmjg=%jshaomiao%-%kssj:~9,2%
if %hmjg% lss 0 set/a hmjg=100+%hmjg%&set/a jsmiao=%jsmiao%-1
set/a miaojg=%jsmiao%-%kssj:~6,2%
if %miaojg% lss 0 set/a miaojg=60+%miaojg%&set/a jsfen=%jsfen%-1
set/a fenjg=%jsfen%-%kssj:~3,2%
if %fenjg% lss 0 set/a fenjg=%fenjg%+60&set/a jsshi=%jsshi%-1
set/a shijg=%jsshi%-%kssj:~0,2%
if %shijg% lss 0 set/a shijg=0-%shijg%
cls
echo 计时开始时间消态:%kssj%
echo 计时结束时间:%jssj%
echo _______________________________________________________________________________
echo 用时穗如:%shijg%时%fenjg%分%miaojg%.%hmjg%秒
pause
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询