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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -