用call 写在一行上,算不算精简?
set wind=%time: =%& call set wind=%%wind::=%%& call set wind=%%wind:.=%%
echo %wind%& pause
都用到for还不懂啊,改一下即可:
@echo off
for /f "tokens=1-4 delims=:. " %%i in ('echo/%time%') do set var=%%i%%j%%k%%l
echo/%var%
pause>nul
set MM=%TIME::=%
set NN=%MM:.=%
echo %NN%
pause