Win7- @echo off
- for /f "skip=2 tokens=2*" %%i IN ('REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Cache') do set ieTmp=%%j
- for /f "skip=2 tokens=2*" %%i IN ('REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Cookies') do set CookiesTmp=%%j
- echo %CookiesTmp%
- echo %ieTmp%
- call:extmpPath %CookiesTmp% CookiesTmp
- call:extmpPath %ieTmp% ieTmp
- echo IE临时文件目录=%ieTmp%&echo Cookies目录=%CookiesTmp%&echo\
- pause
- exit /b
-
- :extmpPath tmpPath tmpPath2
- set %2=%1
- goto :eof
复制代码 WinXP- @echo off
- for /f "skip=3 tokens=2*" %%i IN ('REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Cache') do set ieTmp=%%j
- for /f "skip=3 tokens=2*" %%i IN ('REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Cookies') do set CookiesTmp=%%j
- echo %CookiesTmp%
- echo %ieTmp%
- call:extmpPath %CookiesTmp% CookiesTmp
- call:extmpPath %ieTmp% ieTmp
- echo IE临时文件目录=%ieTmp%&echo Cookies目录=%CookiesTmp%&echo\
- pause
- exit /b
-
- :extmpPath tmpPath tmpPath2
- set %2=%1
- goto :eof
复制代码 copy文件与属性无关,直接copy即可 |