c# - Move a file from a SharePoint library to a UNC path -


i have number of files in document library in sharepoint , url paths files. want able move files sharepoint unc path location file.exists() , file.move() doesn't work url's.

answering own question because wasn't able find specific answer this. found called davwwwroot allows access files through windows explorer.

i created method converts url's form allows me use file.move() on files in sharepoint library.

private string convertsharepointurltouncpath(string sharepointfileurl)     {         return sharepointfileurl.replace(@"http://mysharepointsite/", @"\\mysharepointsite\davwwwroot\").replace('/', '\\');     } 

Comments

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -