我有一个文件夹里有十多万张图片,浏览起来很费力。想分存到数个文件夹中。
于是自己搞了这么一段DOS批处理。但实际却不能使用。哪位大侠给改下?
:
@echo off
set aaa= G:\AAA
set ttt= G:\BBB
set /a newFolderName = Pic
set /a num = 9
set /a newFolderNum = 1
@echo 处理中,请等待...
echo %aaa%
echo %ttt%
echo %newFolderName%
echo %num%
echo %newFolderNum%
dir /s /b "%aaa%\*.*" > 1.tmp
setlocal enabledelayedexpansion
for /f "eol=| delims=|" %%i in (1.tmp) do (
set /a num+=1
if "%num%"=="10" (
MD "%ttt%\%newFolderName%!%newFolderNum%"
set /a newFolderNum += 1
set /a num = 0
) else (
move /-y "%%i" "%ttt%\%newFolderName%!%newFolderNum%\*.*"
)
)
del 1.tmp
@echo 移动完毕