Cannot copy file <> The file exists.

Druga Runda

Sleepy Substitute
Regular
and no - this is not a joke.

Well the problem is there when I try to copy a file from my c: drive to a network drive using "windows explorer" on WinXP.

To be precise the "network drive" is a "web folder". It is based on WSS (windows sharepoint services) by Microsoft - the tool that enables sharing (it is more or less a share drive with a web interface), but it is meant to be accessible directly as well.

The way it works OK is if you open it up through "my network places" and if you add it in there as a web folder. That way it allows you to copy and paste files from there, however if you open up this drive as a "network drive" on your system - ie give it a "letter" and map it, the drive ceases to function in the normal way and you cannot paste files on it, you can read and copy from it though, but when you try to send filed there there comes the lovely error message. Cannot copy file<> The file exists. :smile: (this might be some kind of meaning of life message from Microsoft, along the lines " You cannot copy file therefore the file exists, you cannot copy so you exist too")

So anyone has any other ideas about the error message, what it means, and how to avoid it if possible ;)

-- our friend Google was not too kind to help me dechiper this secret so I am coming here with the quest...

attachment.php
 

Attachments

  • cannot copy it exists.jpg
    cannot copy it exists.jpg
    7.5 KB · Views: 62
Last edited by a moderator:
Maybe the share rights have somehow changed when you mapped the drive. I personally have never had that problem. Maybe you should dissconnect the drive (Networked) and reconnect it..or assign it a different letter.

I just read you post over again...are you mapping from the web folder? if so, maybe you should map directly to the Networked folder.
 
I think that direct mapping is not an option, as for the disconnection or re-mapping I've tried it but doesn't make any difference.

I have just tried to write to it using VBA and CopyFolder (using overwrite), and it throws Run time Error '58': the same one as above, but at least I could find some reference to it on the net.

"Runtime error 58 occurs when you try to rename a file with a name that already exists (in the same folder), or you try to save a new file with the same name as one that already exists (in the same folder)."

which now makes sense, however this is not really happening in my case as there is no files with that name, and it throws the error on any filename, and it could overwrite with this method if there was magically some temp file there. So I guess it is some kind of bug/feature of WSS and Windows interaction... whatever but I have just about given up hope to find something about it on the net and at least I know what it means now...
 
Last edited by a moderator:
It works through the WebClient Service, which is only used through the Internet Explorer browsing a WebDAV-enabled internet sharepoint (which obviously runs over IIS) through HTTP.

I know of no way to use that for file access through other means. That you can map it as a drive at all is a bug. You would need a HTTP server/client that supports WebDAV to automate access, like IIS. Then you could script it.

Edit: although it might work on a W2003 server.
 
DiGuru said:
That you can map it as a drive at all is a bug.

Thats what I found weird. Can the file be written to the "Web Folder"? If it can...then its obvious (what DiGuru) stated that it HAS to be a bug. If it can't...then it must be something else.

EDIT: Forget the question...I re read your post again..and appearntly it does work.
 
BlueTsunami said:
Thats what I found weird. Can the file be written to the "Web Folder"? If it can...then its obvious (what DiGuru) stated that it HAS to be a bug. If it can't...then it must be something else.

EDIT: Forget the question...I re read your post again..and appearntly it does work.

IF it works on a W2003 server that has sharepoints and IIS installed, that might be why it can be mapped. And it is obviously something Microsoft wants to promote. It would be good for them, as it might encourage an adjustment in the percentage of marketshare between IIS and Apache.

Then again, that would be the whole point of using a custom, IIS / Windows only standard instead of FTP, or an open standard like LDAP.
 
DiGuru said:
It works through the WebClient Service, which is only used through the Internet Explorer browsing a WebDAV-enabled internet sharepoint (which obviously runs over IIS) through HTTP.

I know of no way to use that for file access through other means. That you can map it as a drive at all is a bug. You would need a HTTP server/client that supports WebDAV to automate access, like IIS. Then you could script it.

Edit: although it might work on a W2003 server.

interesting,

some convenient bug that allows you to at least browse the folders and copy from them :)

One more "first" that happened to me today. I manually copied the whole W: "network drive" to a folder in C: and in C: it kept the "path" as the network folder!!!

So in Windows explorer the foder tree was under C/xxx/xxx/xxx however the file (s) path inside the folders I copied was showing \\bla\bla\bla like UNC path to the web server?!?

It looked stable, just closing the explorer window and opening it up again and reading the files in this new weird folder... however I didn't want to risk screwing up WSS and just deleted the folder and that was it... no problems after even though I am curious would have it stayed like that after reboot... ah whatever, that product might not be 100% clean but at least nothing is crashing and that is great
icon14.gif
 
Back
Top