大哥· 你写的东西看不太懂 能解释下吗?
我用的这个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
|