How to CreateDirectory to create a directory structure on a network drive

  • Thread starter Thread starter Daniel
  • Start date Start date
D

Daniel

If I call CreateDirectory(\\\\devDriveA\\foo\\bar\\a\\b\\c) and
\\devDriveA\foo\bar already exists then sub directories a\b\c don't get
created. When I use CreateDirectory on my own file system, e.g.
CreateDirectory("c:\\a\\b\\c"); it works fine. Is there something that I
must do to get CreateDirectory to work on network drives?
 
Hi Daniel:

That does seem odd, I just tested:

Directory.CreateDirectory(@"\\sql2005b2\wutemp\a\b");

in my environment and it created both a then b in the remote wutemp
directory. (Using \\\\sql2005b2\\wutemp\\a\\b works also).

Do you see any type of exception being thrown?
 
Back
Top