solemn123 当前离线
列兵
评分人数
pcl_test 当前离线
荣誉版主
@echo off&setlocal enabledelayedexpansion cd /d "d:\ad-spc" for /l %%a in (1 1 12) do ( set n=00%%a for /l %%b in (1 1 31) do ( set m=00%%b set nm=2016!n:~-2!!m:~-2! if exist *!nm!*.* ( md !nm!\ 2>nul move *!nm!*.* !nm!\ ) ) ) pause复制代码
TOP
sishentibu 当前离线
上等兵
@echo off cd /d D:\ad-spc setlocal enabledelayedexpansion for /f %%i in ('dir /b /a-d D:\ad-spc') do ( set a=%%i set b=!a:~5,8! if not exist !b! md !b! move *!b!*.* !b!)复制代码
md 2016年!n:~-2!月\!nm!\ 2>nul move *!nm!*.* 2016年!n:~-2!月\!nm!\复制代码
GNU 当前离线
上尉
@echo off setlocal enabledelayedexpansion cd /d "d:\ad-spc" for /l %%a in (1 1 12) do ( set n=00%%a for /l %%b in (1 1 31) do ( set m=00%%b set nm=2016!n:~-2!!m:~-2! set folder=2016年!n:~-2!月 if exist *!nm!*.* ( md !folder!\ 2>nul move *!nm!*.* !folder!\ ) ) ) pause复制代码