|
-
Feb 4th, 2000, 11:19 PM
#1
Thread Starter
New Member
Hi,
About a month ago I asked about how to copy folder and people helped me and the code did work but now I don't know what is the problem in this code if somebody help me please I really appreciate it. Take a look at the code in the bottom and tell me what is wrong with it:
Code
===========================================
Dim FSO As Scripting.FileSystemObject
Set FSO = New Scripting.FileSystemObject
FSO.CopyFolder dirsource & "\MMSS", dirpath, true
===========================================
END
:dirsource is a directory control
NOTE: Assume the MMSS folder exist in the path I choose from the directory path.
When I run the program I get an error message that the path is not found. I don't know what to do. If you can see a problem which I can not see please tell me.
Thank you :Confused:
-
Feb 5th, 2000, 02:32 AM
#2
Thread Starter
New Member
Hey,
Thanks for responsing, but maybe I didn't explain it good. The MMSS folder is inside another MMSS folder so that is why i use the "\MMSS" string.
Would mind trying it with the string it self. I think that is the problem.
-
Feb 5th, 2000, 12:03 PM
#3
Fanatic Member
Works for me!
I used your code (pasted) with a couple of mods...
Private Sub Command1_Click()
dirpath = "c:\"
Dim FSO As Scripting.FileSystemObject
Set FSO = New Scripting.FileSystemObject
FSO.CopyFolder dirsource & "\rtf", dirpath, True
End Sub
Then pointed the dirlist control to a folder with the rtf folder in it (not the rtf folder itself) and clicked the button. I noticed in windows explorer that in my c drive that an rtf directory had been created and all the files had been copied.
Make sure the you double click on the folder that you open so that the MMSS folder is visible but not open before you do click the button.
Don't quite understand what you're trying to do though. if you can see the MMSS dir why are you adding as a string???
email me if you need to know more
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
|