Results 1 to 2 of 2

Thread: Copy Folder

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Copy Folder

    How I can copy the folder from one location to another location ?

  2. #2
    Fanatic Member Dungeon Keeper's Avatar
    Join Date
    Mar 2008
    Posts
    590

    Re: Copy Folder

    Copies the contents of folder to another folder
    Code:
    Private Sub Command1_Click()
    Dim fso, fldr
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set fldr = fso.GetFolder("c:\my")
    fldr.Copy ("c:\temp")
    End Sub
    Creates another folder and copies the contents of folder to that new folder

    Code:
    Private Sub Command1_Click()
    Dim fso, fldr
    Set fso = CreateObject("Scripting.FileSystemObject")
    fso.CreateFolder ("c:\folder")
    Set fldr = fso.GetFolder("c:\my")
    fldr.Copy ("c:\folder")
    End Sub
    And in the end

    Code:
    set fso = Nothing
    set fldr = Nothing
    Last edited by Dungeon Keeper; Apr 27th, 2008 at 11:14 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