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]
Printable View
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]
Take a look at this thread which shows how to copy all files in a folder and put them in another.
the code didn't work i have vb5 without any servie packs so is there any other volunters
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
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