如题  简单点的程序搜索 D盘  下名为  源文件 文件夹下所有的符合标准的文件 复制到 D盘名为“新文件”文件夹下
其中源文件文件夹下包含很多子文件夹请高手指点一二  多谢

解决方案 »

  1.   

    思路:
    1、使用Dir查找符合条件的文件
    2、使用FileCopy复制文件大目标文件夹
      

  2.   

    Uhttp://apps.hi.baidu.com/share/detail/11144033P,你自己百度一下,VB查找指定的文件答案一堆,
      

  3.   

    我的帖沉在海底去了,你帮我解决吧http://topic.csdn.net/u/20110627/09/9e6c75e3-42d9-4a14-82f5-22c5c47a91b2.html
      

  4.   

    一个参考例子:Public Function File_Folder_List(ByVal source As String, Optional dFileList As Variant = Null, Optional dFolderList As Variant = Null) As Boolean
        '循环处理文件集合
        Dim fs, f, f1, d1, bFlag As Boolean
        On Error GoTo lError
        bFlag = True
        Set fs = CreateObject("Scripting.FileSystemObject")
        Set f = fs.GetFolder(source)    'fs 有 Files 和 SubFolders 集合
        
        '.Count .Item(key) [= newitem]
        '.Name .Path .ShortName .ShortPath .Size .Type .Attributes .DateCreated .DateLastAccessed .DateLastModified .ParentFolder
        '.Drive(AvailableSpace .DriveLetter .DriveType .FileSystem .FreeSpace .IsReady .Path .TotalSize, .RootFolder
        '.SubFolders{}
        
        '没有参数时,若要使 dFileList dFolderList 参与循环,将以下 If 语句封住即可
        If Not IsNull(dFileList) Then
            Set dFileList = f.Files
            For Each f1 In dFileList
                With f1
                    '处理集合中的文件
            
                    '
                End With
            Next f1
        End If    If Not IsNull(dFolderList) Then
            Set dFolderList = f.SubFolders
            For Each d1 In dFolderList
                With d1
                    '处理集合中的文件夹
            
                    '
                End With
            Next d1
        End If
        GoTo lExit
    lError:
        'MsgBox: vbCritical vbExclamation vbInformation vbQuestion
        MsgBox "文件夹 " & source & " 有误,请检查!", vbOKOnly + vbExclamation, "警告"
        bFlag = False
    lExit:
        If IsObject(f1) Then Set fd = Nothing
        If IsObject(d1) Then Set fc = Nothing
        If IsObject(f) Then Set f = Nothing
        If IsObject(fs) Then Set fs = Nothing
    End Function