20 lignes
643 o
Batchfile
20 lignes
643 o
Batchfile
|
@echo off
|
||
|
:: Date generator for Mikrotik
|
||
|
:: Generate a console command based on computer's date and time
|
||
|
:: Command format is for RouterOS 7.10 and later
|
||
|
:loop
|
||
|
cls
|
||
|
set date-day=%date:~0,2%
|
||
|
set date-year=%date:~6,4%
|
||
|
set time-hour=%time:~0,2%
|
||
|
set time-min=%time:~3,2%
|
||
|
set time-sec=%time:~6,2%
|
||
|
set date-month=%date:~3,2%
|
||
|
|
||
|
echo.
|
||
|
echo /system/clock/set date=%date-year%-%date-month%-%date-day% time=%time-hour%:%time-min%:%time-sec% time-zone-name=Europe/Paris;
|
||
|
echo /system/clock/set date=%date-year%-%date-month%-%date-day% time=%time-hour%:%time-min%:%time-sec% time-zone-name=Europe/Paris; |clip
|
||
|
echo (copied in clipboard)
|
||
|
echo.
|
||
|
pause
|
||
|
goto loop
|