Created
June 20, 2021 13:25
-
-
Save dolphinotaku/9d883b9dd2abab07fe6ed16115031304 to your computer and use it in GitHub Desktop.
minecraft timestamp_recorder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^r:: | |
Run, "D:\minecraft\timestamp_recorder\print.cmd" | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: initialize currenct date time variable | |
for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set dt=%%a | |
set YYYY=%dt:~0,4% | |
set MM=%dt:~4,2% | |
set DD=%dt:~6,2% | |
set HH=%dt:~8,2% | |
set Min=%dt:~10,2% | |
set Sec=%dt:~12,2% | |
:: set stamp=%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec% | |
:: set stamp=%YYYY%%MM%%DD% | |
set _STAMP=%YYYY%-%MM%-%DD%_%HH%%Min%%Sec% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
call config.bat | |
REM create current day folder | |
set folder_name=%YYYY%-%MM%-%DD% | |
if not exist ".\%folder_name%\" mkdir ".\%folder_name%\" | |
REM append timestamp in file | |
set logfile_name="timestamp.txt" | |
set logfile_path=".\%folder_name%\%logfile_name%" | |
echo %_STAMP% >> %logfile_path% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment