Вот:
Код:
@echo off
SetLocal EnableExtensions
SetLocal EnableDelayedExpansion
set Dst=C:\TEMP\
for /f "tokens=* delims=" %%F in ('dir /a-d /b /o-d') do if "!N!"=="5" (
move /Y %%F %Dst%
Echo Moving %%F ^(!D!^) Err=!ErrorLevel! >>Last5.log
) else (
set D=%%~tF
set D=!D:~0,10!
if not "!D!"=="!P!" (
set P=!D!
set /a N+=1
)
echo Skiping %%F ^(!D!, wait=!N!^)>>Last5.log
)