以下函数目的,在指定路径下查找含指定关键词的图片文件,
路径下明明存在该文件,但就是找不到,
请教大家,谢谢
Dim path As String = Args(0) ''路径
Dim gjc As String = Args(1) ''关键词
Dim file As String '''查找到文件
For Each wj As String In FileSys.GetFiles(path)
'Forms("档案管理").text = wj
Dim wjm As String = FileSys.GetName(wj) '''文件名
If wjm.Contains(gjc) = True AndAlso wjm.Contains(".jpg") = True Then
file = wj
goto A:
End If
Next
For Each pth As String In FileSys.GetDirectories(path)
Functions.Execute("搜索档案",pth,gjc)
Next
A:
Return file
[此贴子已经被作者于2016/4/17 19:14:00编辑过]