Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- @setlocal enableextensions
- @cd /d "%~dp0"
- mode 48,12
- :start
- cls
- echo.
- echo 1 - Mudar data
- echo 2 - Retornar a data atual
- echo.
- echo.
- echo.
- echo.
- choice /n /c:12 /m "Digite uma op‡Æo:"%1
- if errorlevel ==2 goto 2
- if errorlevel ==1 goto 1
- :1
- cls
- set /p "dd=Digite o dia: "
- cls
- set /p "mm=Digite o mes: %dd% - "
- cls
- set /p "aa=Digite o ano: %dd% - %mm% - "
- cls
- date %dd%-%mm%-%aa%
- if not errorlevel 1 (
- cls
- echo Data modificada.
- pause
- goto start
- )
- if errorlevel 1 (
- cls
- echo Erro ao mudar a data.
- pause
- goto start
- )
- :2
- cls
- w32tm /resync >nul 2>nul
- cls
- goto start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement