创建日期时间目录.bat

@echo off
cd/d %~dp1
set y=%date:~0,4%
set m=%date:~5,2%
set d=%date:~8,2%

set /a th=%time:~0,2%
if %th% LSS 10 (set hh=0%th%) else (set hh=%th%)
set /a tm=%time:~3,2%
if %tm% LSS 10 (set mm=0%tm%) else (set mm=%tm%)
set /a ts=%time:~6,2%
if %ts% LSS 10 (set ss=0%ts%) else (set ss=%ts%)

mkdir "%y%%m%%d%/%hh%%mm%%ss%"

猜你喜欢

转载自blog.csdn.net/FireGhost57/article/details/79824115
今日推荐