Results 1 to 5 of 5

Thread: copying entire folders

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    Orange County
    Posts
    68

    Question

    Does anybody know how to copy an entire folder for vb is there some api out there because FileCopy doesn't help if you can please reply thanx in advance.




    [Edited by vb5prog on 08-28-2000 at 09:53 PM]
    Windows XP Professional
    Microsoft Visual Basic 6.0 Professional

  2. #2
    Guest
    Take a look at this thread which shows how to copy all files in a folder and put them in another.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    Orange County
    Posts
    68

    Angry

    the code didn't work i have vb5 without any servie packs so is there any other volunters
    Windows XP Professional
    Microsoft Visual Basic 6.0 Professional

  4. #4
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    well..... you can in a way I think...

    just leave the error, and when you give it to other people, just supply the vb6 runtime files, and you'll be allset

    I never tried it, but is should work
    NXSupport - Your one-stop source for computer help

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

    <?>

    Code:
    'copy or save all files in one folder to a different directory
    
    Private Sub Command1_Click()
    
        Dim SourcePath As String, DestPath As String
        Dim stFile As String
        
        'folder I want to copy the files form
        SourcePath = "C:\my documents\"
        DestPath = "c:\MyNewFolder\"
        
        'all files in the folder C:\my documents
        stFile = Dir$(SourcePath & "*.*")
        
        Do While stFile <> ""
        
        'copy all the files in c:\my documents to C:\MyNewFolder
          FileCopy SourcePath & stFile, DestPath & "\" & stFile
         
          stFile = Dir
        Loop
    
    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

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