昨日当年
你一双澄澈眼眸 便使我颠沛中毕生富有
批处理获取当前时间
set currentDate=%date:/=_%
set currentDate=%currentDate:~0,10%

set currentTime=%time:~0,5%
set currentTime=%currentTime: =0%
set currentTime=%currentDate%_%currentTime::=%

echo %currentTime%
# 2020_08_03_1630

批处理不能在一行内对字符串作出多个操作,所以不能又替换又截取


相关日志