Created
January 22, 2015 19:25
-
-
Save ha2ne2/33587f931031b285b27c to your computer and use it in GitHub Desktop.
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 | |
setlocal enabledelayedexpansion | |
rem hh:mm:ssを3桁の英数字に変換する 2015-01-23 | |
rem 04:04:33 -> 45x | |
set hash=0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX | |
for /l %%i in (0, 1, 9) do set hash[0%%i]=!hash:~%%i,1! | |
for /l %%i in (10, 1, 59) do set hash[%%i]=!hash:~%%i,1! | |
set date=%date:~-8,2%%date:~-5,2%%date:~-2,2% | |
set time1=%time: =0% | |
set return= | |
call :encode %time1:~0,2% | |
set hour=%return% | |
set return= | |
call :encode %time1:~3,2% | |
set min=%return% | |
set return= | |
call :encode %time1:~6,2% | |
set sec=%return% | |
echo %date%_%hour%%min%%sec%.flv | |
exit /b | |
:encode | |
set i=%~1 | |
call set result=%%hash[%i%]%% | |
set return=%result% | |
exit /b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment