|
-
Jan 23rd, 2000, 03:48 AM
#1
Thread Starter
New Member
Hi, I am writting an application which is seppose to backup couple of folders. But when I use the file copy to copy a folder I get an error message. Is it possible to use the filecopy to copy folders????? I really appreciate if someone help me.
-
Jan 23rd, 2000, 04:34 AM
#2
Guru
Add a reference to Microsoft Scripting Runtime
Code:
Dim fso As Scripting.FileSystemObject
Set fso = New Scripting.FileSystemObject
fso.CopyFolder "C:\Test1", "C:\Test2", True
Set fso = Nothing
-
Jan 23rd, 2000, 12:41 PM
#3
Thread Starter
New Member
To Clunietp
Thanks for your response.
I tried the code by putting it into the form_load procedure but I get an error message for the first line which was:
Dim fso As scripting.filesystemobject
CODE
===========================================
Private Sub Form_Load()
Dim fso As scripting.filesystemobject
Set fso = New scripting.filesystemobject
fso.copyfolder "c:\my download files, "c:\windows\desktop\downloads", True
Set fso = Nothing
End Sub
===========================================
End Code
I don't know what is the problem can you help me out again please??
-
Jan 23rd, 2000, 01:15 PM
#4
-
Jan 23rd, 2000, 02:30 PM
#5
Thread Starter
New Member
TO Clunietp
I am sorry but I have never done that and I tried what you told me and it did not work. Do you have any sample application or anything I can see the codes and how it works.
Thanks alot again.
-
Jan 23rd, 2000, 10:18 PM
#6
Select References from the Project menu. From the selection in the listbox, select Microsoft Scripting Runtime (make sure the checkbox is checked). Then use the code Tom provided.
------------------
Serge
Software Developer
[email protected]
ICQ#: 51055819
[This message has been edited by Serge (edited 01-24-2000).]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|