|
-
Nov 4th, 1999, 02:06 AM
#1
Thread Starter
Hyperactive Member
I need to copy directories of files over to a network drive...
They are currently on CDs and need to go to a network drive in a folder to be created before copying. This folder will be the CD name.
For example:
I have a CD named CD215 in my CD drive. On the CD are the folders 1902, 1903, 1904, & 1905 each with several files in them
I need to:
1. Create a folder named CD215 on my network drive (I can do this part)
2. Copy folders 1902, 1903, 1904, & 1905 INCLUDING their contents to the CD215 folder I just created...
Anyone know how to do this?
Thanks!!
------------------
Morgan
[email protected]
My Web Page
-
Nov 4th, 1999, 02:20 AM
#2
Probably the easiest way is to use FileSystem object. So, add a reference to Microsoft Scripting Runtime and use something like this:
Code:
Dim oFSO As New FileSystemObject
oFSO.CopyFolder "D:\1902\*", "N:\CD215\"
oFSO.CopyFolder "D:\1903\*", "N:\CD215\"
oFSO.CopyFolder "D:\1904\*", "N:\CD215\"
oFSO.CopyFolder "D:\1905\*", "N:\CD215\"
Where N is a network drive.
NOTE: You would have to include Scripting Runtime (scrrun.dll) with your application when you distribute it.
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
[This message has been edited by Serge (edited 11-04-1999).]
-
Nov 4th, 1999, 02:28 AM
#3
Thread Starter
Hyperactive Member
OK, one problem is that the folder names won't be the same on each CD. Is there a way to copy all folders, no matter what their name?
------------------
NEVERMIND....Had I played before I wrote, I would have figured it out...
I go it to work using:
Code:
oFSO.CopyFolder "D:\*", "C:\temp\"
Thanks for the great info!!
[This message has been edited by rockies1 (edited 11-04-1999).]
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
|