- @echo off
- ::收集后的图片在"C:\Documents and Settings\photos"文件夹内,并且按日期分档.
- mode con cols=86 lines=8
- title ie临时图片收集(进度版)
- color 9e
- set nonum=0
- set yesnum=0
- del %temp%\copys.ini>nul 2>nul
- setlocal EnableDelayedExpansion
- set/p delnum=过滤图片文件大小(小于,单位KB,如:20):
- set /a deletenum=delnum*1024
- if not exist "c:\Documents and Settings\photos\." md "c:\Documents and Settings\photos\"
- for /f "tokens=*" %%i in ('dir "%userprofile%\Local Settings\Temporary Internet Files\*.jpg","%userprofile%\Local Settings\Temporary Internet Files\*.gif" /s/b') do (
- if %%~zi lss %deletenum% (
- for /l %%c in (1,1,45) do (set/p=<nul)
- set /a nonum+=1
- set/p=放弃 !nonum! 个文件,可以复制 !yesnum! 个文件.<nul
- ) else (
- for /l %%c in (1,1,45) do (set/p=<nul)
- set /a yesnum+=1
- echo %%~ti "%%i">>%temp%\copys.ini
- set/p=放弃 !nonum! 个文件,可以复制 !yesnum! 个文件.<nul
- )
- )
- set /a copynum=yesnum/80+1
- set /a copygd=yesnum/copynum
- echo.&echo.&echo.&set /p= <nul
- for /l %%i in (1,1,!copygd!) do set /p=^<<nul
- for /l %%i in (1,1,!copygd!) do set /p=<nul
- for /f "tokens=1,2,*" %%j in (%temp%\copys.ini) do (
- if not exist "c:\Documents and Settings\photos\%%j\." md "c:\Documents and Settings\photos\%%j\"
- copy %%l "c:\Documents and Settings\photos\%%j\" /y >nul 2>nul
- call :xs
- set /a cf+=1
- title 已经复制 !cf! 个文件...
- )
- echo.&echo.&echo.&echo. 已经复制完成!
- ping -n 5 127.1>nul&start "" "C:\Documents and Settings\photos"&pause>nul&exit
- :xs
- set /a n+=1
- if !n! EQU !copynum! ((set n=0)&(set /p=^><nul)&goto :eof)
复制代码
|