I have a shared drive mapped to my local as drive Z. Using Windows Explorer, I can create directories in that folder all day long. The moment I try to add a directory from anywhere else, I get an error (a device attached to the system is not functioning). I'd ideally like to create the new directory from C# - which throws that same exception. I've tried xcopy and robocopy and both of those also fail with the same error.
So, does anyone know why creating a folder would work 100% of the time in explorer and 0% from anywhere else (including the most needed C# code)?
I've tried both of these to no avail
var di =newDirectoryInfo("z:\");
di.CreateSubDirectory("Test");
var di =newDirectoryInfo("\\servername\sharename\attachments\");
di.CreateSubDirectory("Test");
I've also tried (where test is the folder I'd like created)
I've also done this with no happiness... Same error
c:\> z:
z:\> md test
If I navigate to either the Z drive or the share directly in Windows Explorer, I can right click and add a folder (and rename it). I'm stumped. I keep thinking its a permissions issue of some kind but then rationalize that Explorer and a command prompt are both running as my user (non-elevated) so how can permissions come into play..
Question
+Biscuits Brown MVC
I have a shared drive mapped to my local as drive Z. Using Windows Explorer, I can create directories in that folder all day long. The moment I try to add a directory from anywhere else, I get an error (a device attached to the system is not functioning). I'd ideally like to create the new directory from C# - which throws that same exception. I've tried xcopy and robocopy and both of those also fail with the same error.
So, does anyone know why creating a folder would work 100% of the time in explorer and 0% from anywhere else (including the most needed C# code)?
I've tried both of these to no avail
I've also tried (where test is the folder I'd like created)
I've also done this with no happiness... Same error
c:\> z: z:\> md test
If I navigate to either the Z drive or the share directly in Windows Explorer, I can right click and add a folder (and rename it). I'm stumped. I keep thinking its a permissions issue of some kind but then rationalize that Explorer and a command prompt are both running as my user (non-elevated) so how can permissions come into play..
Any one have any ideas?
Link to comment
https://www.neowin.net/forum/topic/1361968-creating-a-directory-on-a-shared-drive/Share on other sites
0 answers to this question
Recommended Posts