找回密码
 加入
搜索
查看: 3665|回复: 4

[IE类操作] Temporary Internet Files 目录里的文件用什么方法可以 读取 复制[已解决]使用IE8

[复制链接]
发表于 2013-3-16 13:02:40 | 显示全部楼层 |阅读模式
本帖最后由 410521a 于 2013-5-24 13:40 编辑

别的路行不通· 我选择了这条路· 但问题又出现在·  里边的文件AU3检测不到,复制不出,,

请高手赐教  

$FileList=_FileListToArray(@UserProfileDir &"\Local Settings\Temporary Internet Files\")
If @Error=1 Then
        MsgBox (0,"","No Folders Found.")
        Exit
EndIf
If @Error=4 Then
        MsgBox (0,"","No Files Found.")
        Exit
EndIf
_ArrayDisplay($FileList,"$FileList")

没有文件·    我想要一个JPG文件
发表于 2013-3-16 13:23:21 | 显示全部楼层
#Include <Array.au3>

Local $sPath = RegRead('HKCU64\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders', 'Cache')

Local $sFiles
_FileFindAll($sPath, $sFiles, '.jpg')

Local $aLine = StringRegExp($sFiles, '\V+', 3)
_ArrayDisplay($aLine, '')

Func _FileFindAll($sDir, ByRef $sOut, $sExt)
        Local $hSearch = FileFindFirstFile($sDir & '\*.*')
        If $hSearch = -1 Then Return
        While 1
                Local $sFile = FileFindNextFile($hSearch)
                If @error Then ExitLoop
                If @extended Then
                        _FileFindAll($sDir & '\' & $sFile, $sOut, $sExt)
                        ContinueLoop
                EndIf
                If StringRight($sFile, 4) = $sExt Then $sOut &= $sDir & '\' & $sFile & @CRLF
        WEnd
        FileClose($hSearch)
EndFunc   ;==>_FileFindAll
 楼主| 发表于 2013-3-16 15:04:13 | 显示全部楼层
大哥· 你写的东西看不太懂  能解释下吗?  

我用的这个
searchpst("C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files","*","jpg");查找后缀名文件;

Func searchpst($patch,$str,$mask);自定义搜索函数
Local $search,$file,$array,$pst
$search = FileFindFirstFile($patch&$str)  
If $search  Then
While 1        
        $file = FileFindNextFile($search) 
        If @error Then ExitLoop
        $array=StringSplit($file,".")
        $pst =$array[UBound($array)-1]
        if $pst=$mask Then              
         FileCopy($patch&"yzm*.jpg","d:\yzm.jpg",1)
        EndIf           
        if FileChangeDir( $patch&$file)=1 Then
                searchpst($patch&$file&"",$str,$mask)                                
EndIf
WEnd
FileClose($search)
EndIf
EndFunc
发表于 2013-3-17 06:26:52 | 显示全部楼层
User Shell Folders cache
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-29 09:33 , Processed in 0.099907 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表