Results 1 to 6 of 6

Thread: Should be easy but is not

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 1999
    Posts
    27
    Does anyone have a code snipit to share that shows how to copy c:\start\*.* to c:\end ? The wild card copy seems to be a problem. Thanks.

  2. #2
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    Untested, but I had a previous problem where I had to use a single wildcard :
    c:\start\* to c:\end
    and this worked insted, I will take another look though...

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  3. #3
    Guest
    some of the functions in the FileSystemObject allow wildcards. Look it up on the MSDN CD or website.

  4. #4
    Guest
    reeset shows an example of how to do this in this thread.

  5. #5
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Code:
    'copy the contents of a folder or directroy
    'to a folder on a different drive
    'using a wild card
    
    
    Private Sub Form_Load()
    
    Dim FSO As Object
        On Error GoTo NOFSO
        Set FSO = CreateObject("Scripting.FileSystemObject")
    
        On Error Resume Next
        FSO.CopyFile "C:\MySubDir\MyOtherSubDir\*", "C:\MyNewDir\", True
        
        Set FSO = Nothing
        Exit Sub
    NOFSO:
        MsgBox "FSO CreateObject Failed"
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Nov 1999
    Posts
    27
    Thanks, works great!!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width