以前的XP下的到了windows7就不适用了,看了下,原来是缓存目录变了,现在改好了,发IE缓存提取批处理.bat(vista、windows7版) echo off cls echo 请选择要提取的文件类型 echo 1(swf) 2(flv) 3(jpg) 4(gif) 5(mp3) 6(mid) 7(其它类型) set /p type= if %type%==1 (set filetype=swf) if %type%==2 (set filetype=flv) if %type%==3 (set filetype=jpg) if %type%==4 (set filetype=gif) if %type%==5 (set filetype=mp3) if %type%==6 (set filetype=mid) if %type%==7 (echo 请输入文件类型,例如bmp set /p filetype=) for /f "tokens=1,2*" %%i in ('reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"^|find /i "Cache"') do set "IEtmp=%%k" ::echo %userprofile%%IEtmp:~13% 从注册表里提取的缓存目录 :select_del_or_not echo 提取后是否删除原文件?(y/n) set /p delornot= if %delornot%==y (goto startcopy) if %delornot%==n (goto startcopy) goto select_del_or_not :startcopy echo 正在提取文件,请稍候…… md %filetype% for /f "delims=" %%i in ('dir "%userprofile%%IEtmp:~13%\*.%filetype%" /s/b') do copy /y "%%i" "%CD%\%filetype%\" if %delornot%==y (for /f "delims=" %%i in ('dir "%userprofile%%IEtmp:~13%\*.%filetype%" /s/b') do del /f/q "%%i") pause goto startcopy