Results 1 to 13 of 13

Thread: strt.CopyFolder

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2005
    Posts
    1,069

    strt.CopyFolder

    Hello

    i have got a command button on a form which used to copy the contents of the folder to another folder, however it is now throwing an error for some reason.

    it comes up with the msg "error" because of the messagebox
    can you guys tell me how to figure out why is it throwing an error?

    VB Code:
    1. Dim strt As New FileSystemObject
    2.  
    3. '        'this actually over writes all files in the currentDirPath directory with those stored under the initialize directory
    4.     Command2.BackColor = RGB(255, 255, 255)
    5.     Command2.Refresh
    6.     On Error GoTo Error:
    7.     'Call strt.CopyFolder(WiMAXDoORsrootdir & "\Initialize", currentDirPath, True)
    8.     Call strt.CopyFolder("C:\WiMAXDoORs\Projects\Initialize", "C:\WiMAXDoORs\Projects\SampleProject-2", True)
    9.     MsgBox "no error"
    10.  
    11. Error:
    12.     Command2.BackColor = &H8000000F
    13.     MsgBox "error"
    14.     Command2.Refresh


    i removed the error handler and it says

    Run-time error '-2147023672 (800704c8)':
    Method 'CopyFolder' of object 'IFileSystem3' failed
    and it comes up with end, debug, help
    Last edited by vb_student; Oct 5th, 2005 at 10:57 AM.

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