代码不全,猜一下。
MsgBoxDJS(48, "温馨提示", "正在查找指定日期文件,请等待复制结束提示!", 2, 2)
$sum = 0
Local $temp=0
For $i=1 To $FileSearch[0]
$FileDateGet = StringLeft(FileGetTime($FileSearch[$i], 0, 1), 8)
If $_Switch = 1 Then
If $FileDateGet >= $FileDate1 And $FileDateGet <= $FileDate2 Then
$temp+=1
EndIf
ElseIf $_Switch = 0 Then
If $FileDateGet = $FileDate1 Or $FileDateGet = $FileDate2 Then
$temp+=1
EndIf
EndIf
Next
For $i = 1 To $FileSearch[0]
$FileDateGet = StringLeft(FileGetTime($FileSearch[$i], 0, 1), 8)
If $CopyTo = "" Then $CopyTo = @WorkingDir
If $_Switch = 1 Then
If $FileDateGet >= $FileDate1 And $FileDateGet <= $FileDate2 Then
;If FileCopy($FileSearch[$i], $CopyTo, 1) Then $sum += 1
$sum+=1
ToolTip("正在复制"&$FileSearch[$i]&@CRLF&"总进度:"&$sum/$temp*100&"%",@DesktopWidth-100,@DesktopHeight-100)
FileCopy($FileSearch[$i], $CopyTo, 1))
EndIf
ElseIf $_Switch = 0 Then
If $FileDateGet = $FileDate1 Or $FileDateGet = $FileDate2 Then
If FileCopy($FileSearch[$i], $CopyTo, 1) Then $sum += 1
EndIf
EndIf
Next
If $sum <> 0 Then
MsgBoxDJS(48, "温馨提示", "共复制了" & $sum & "个文件!", 3, 2)
Else
MsgBoxDJS(48, "温馨提示", "没有找到附合条件的文件!", 3, 2)
EndIf
|