I currently have a Desktop application that is able to upload a file to the root directory of my "Documents" Document Library on the Sharepoint Site I am using.
This is done with the following code;
Dim context As New ClientContext(serviceSiteUrl) context.Credentials = GetCredentials() Dim web = context.Web Dim newFile = new FileCreationInformation newFile.Content = IO.File.ReadAllBytes(destination) newFile.Url = Path.GetFileName(destination) Dim docs = web.Lists.GetByTitle("Documents") docs.RootFolder.Files.Add(newFile) context.ExecuteQuery() Console.WriteLine("File uploaded") context.Dispose()
My question is; How am I able to get this application to navigate instead to one of the folders that is currently present within the document library? Currently, the files being uploaded are within the same directory as the folders i'd like them to be within.