Results 1 to 3 of 3

Thread: [RESOLVED] copy folder

  1. #1

    Thread Starter
    Lively Member chxxangie's Avatar
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    79

    Resolved [RESOLVED] copy folder

    for example,
    i have a folder (My Music) in directory
    "C:\Documents and Settings\Owner\My Documents\My Music"

    now i want to copy My Music to another directory, likes....
    "C:\Documents and Settings\Owner\My Documents\My Folder\My Music"

    how to do it?

    ** is copy, not shortcut......
    Last edited by chxxangie; Feb 26th, 2007 at 03:59 AM.

  2. #2

    Thread Starter
    Lively Member chxxangie's Avatar
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    79

    Re: copy folder

    VB Code:
    1. Private Sub Command1_Click()
    2.  
    3. FileCopy "a.txt", "b.txt"
    4.  
    5. End Sub

  3. #3
    Fanatic Member amrita's Avatar
    Join Date
    Jan 2007
    Location
    Orissa,India
    Posts
    888

    Smile Re: copy folder

    1. Add a reference to Microsoft scripting runtime.
    2. Write the following
    VB Code:
    1. Dim fso As New FileSystemObject
    2.  
    3. fso.CopyFolder "C:\TEST\New", "C:\TEST", True '--to allow overwrite

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