I am new to SharePoint development, so forgive me if I am asking stupid questions. I have spent quite some time searching the web without success, so I am hoping to find an answer here.
Within a .NET Windows Forms application, I am trying to download (and later sync) a folder including subfolders from a SharePoint given the URL of the folder (e.g. https://mysharepoint/dummy1/dummy2/dummy3/myfolder) using CSOM. Target SharePoint versions are 2010 and 2013 (although it would be interesting to know how to do the same in 2007).
Looking at the URL, I can't really tell which part refers to a site, document library or folder within a document library. Fact is, this URL will later on be specified by the end user and will reference the end user's SharePoint, so I really don't know anything about the structure of the SharePoint.
So here are my questions:
- How do I get the right url for the ClientContext constructor?
- How do I get a reference to myfolder so I can iterate through files and subfolders?
Any hints on the right approach or even code samples will be greatly appreciated.