7

I'm using Windows 7 and have a remote folder available. Let's call it \\mycompany-portal\somefolder\attachments.

I can map a network drive to the folder root, so Z:\ points to \\mycompany-portal. I originally used the command prompt pushd \\mycompany-portal, however manual mapping through windows explorer makes no difference.

I note that the mapped drive is actually a DavWWWRoot

I can navigate to z:\somefolder\attachments in Windows Explorer and create a new folder therein successfully.

However, when I attempt to create a folder in this location from the cmd.exe command prompt using mkdir I get the error:

A device attached to the system is not functioning.

The mkdir command was mkdir 11112. The intention was for 11112 to be the Sharepoint call id. This fails, however mkdir blahblah works just fine in the command prompt

Why would this be?

  • 1
    How exactly are you using 'mkdir'? Are you able to change to the Z: drive at all in the command prompt? Are you opening the command prompt "As Administrator" by any chance? – Ƭᴇcʜιᴇ007 Mar 13 '14 at 16:17
  • Yes, I'm able to change to the Z: in the command prompt. It doesn't matter if I'm running as administrator or not. The same happens either way. – James Wiseman Mar 13 '14 at 16:24
  • Not sure if it's relevant, but the remote location in question is a Sharepoint share. – James Wiseman Mar 13 '14 at 16:25
  • Can you provide the mkdir command you're using? – JSanchez Mar 13 '14 at 16:26
  • Interesting. The mkdir command was mkdir 11112. The intention was for 11112 to be the Sharepoint call id. This fails, however mkdir blahblah works just fine in the command prompt. Strange. – James Wiseman Mar 13 '14 at 16:31
1

The Sharepoint WebDAV folder in which I was trying to create the directory was itself linked to an 'Attachments' folder in Sharepoint. Each sub folder was named accordingly to the sharepoint ID number of the associated list.

The error occurred when trying to create a folder directly with a name comprising wholly of numbers. I'm still unsure as to why this might be.

Anyway, the reason it worked in Windows Explorer was that when creating a new directory there, Windows Explorer first creates a folder called "New Folder" and then renames it when you name it.

Trying this manually from the command prompt, i.e. mkdir xxxxx then rename xxxx 11112 demonstrated that it worked ok.

Given that this is WebDAV, all such requests are made through a RESTful API, so it is possible to sniff these with a packet sniffer (I used Fiddler). There I got a more indicative error message (though no more helpful).

Cannot create folder "somefolder/Attachments/1000001"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.