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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -