tempus
Member
- Joined
- Oct 8, 2013
- Messages
- 11
- Programming Experience
- 10+
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 an IO exception with the same message. 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
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?
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
C#:
[COLOR=#000000]var di [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000088]new[/COLOR]DirectoryInfo[COLOR=#666600]([/COLOR][COLOR=#008800]"[/COLOR][COLOR=#000000]z[/COLOR][COLOR=#666600]:[/COLOR][COLOR=#000000]\"[/COLOR][COLOR=#666600]);[/COLOR][COLOR=#000000]
di[/COLOR][COLOR=#666600].[/COLOR]CreateSubDirectory[COLOR=#666600]([/COLOR][COLOR=#008800]"Test"[/COLOR][COLOR=#666600]);[/COLOR][COLOR=#000000]
var di [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000088]new[/COLOR]DirectoryInfo[COLOR=#666600]([/COLOR][COLOR=#008800]"[/COLOR][COLOR=#000000]\\servername\sharename\attachments\"[/COLOR][COLOR=#666600]);[/COLOR][COLOR=#000000]
di[/COLOR][COLOR=#666600].[/COLOR]CreateSubDirectory[COLOR=#666600]([/COLOR][COLOR=#008800]"Test"[/COLOR][COLOR=#666600]);[/COLOR]
I've also tried (where test is the folder I'd like created)
C#:
xcopy file.txt z:\test\file.txt /T
robocopy c:\ z:\test\ file.txt /COPY:DT
I've also done this with no happiness... Same error
C#:
[COLOR=#000000]c:\> z:
z:\> md test[/COLOR]
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?