哆啦的时光机
'strDDir 要检索的目录,strSearchChr 要检索的文件名Private Function SetFileRB(ByVal strDDir As String, ByVal strSearchChr As String) As Integer Dim dirInfo As New DirectoryInfo(strDDir) Dim intCnt As Integer = 1 Dim intTemp As Integer = 0 If dirInfo.Exists Then Dim files As FileInfo() = dirInfo.GetFiles(strSearchChr) Dim i As Integer For i = 0 To files.Length - 1 '自己的处理 Next End If Return intCnt End Function