Directory copy

pruebens

Well-known member
Joined
Nov 21, 2002
Messages
71
Im trying to copy a users favorites directory up to the network using the follwing code:

Directory.Move("C:\Documents and Settings\" & userID & "\Favorites", "H:\favorites")

When this executes I get the following error:

Source and destination path must have identical roots. Move will not work across volumes.

Which obviously means Im using the wrong command. Could someone please fill me in on what command I need to use? Thanks.
 
There is no member of the Directory class to copy a whole directory, youll have to do it manually, file by file using File.Copy. If you need to do subdirectories as well your code will have to recurse on itself.
 
Back
Top