- @echo off
- Set /p ext=请输入要搜索的文件类型(如flv):
- If Not EXIST .\%ext%\ md %ext%\
- For /f "skip=4 tokens=1,2 delims=:" %%i in ('Reg Query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v cache') Do (
- Set Driv=%%i&&Set Cache=%%j
- )
- Set Cache=%Driv:~-1%:%Cache%\Content.ie5\
-
- For /f "delims=" %%i in ('dir /s /b "%Cache%\*.%ext%"') do (
- Copy "%%i" .\%ext%\
- )
- Echo 复制完毕!
- Set /p flag=是否现在清除临时文件夹中的%ext%文件?
- If Not "%flag%"=="" goto :ClearTmp
- Exit
- :ClearTmp
- del /f /s /q "%Cache%\*.%ext%"
- Echo 清除完毕!按任意键退出……
- pause>nul
复制代码
|