本文介绍了如何使用C#在onedrive中获取文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何以正确的方式从一个驱动器获取文件我尝试了几种方式。



我尝试过的方法:



How can i get files from one drive in correct way i tried several ways.

What I have tried:

string remoteUri = "http://www.contoso.com/library/homepage/images/";
			string fileName = "ms-banner.gif", myStringWebResource = null;
			// Create a new WebClient instance.
			WebClient myWebClient = new WebClient();
			// Concatenate the domain with the Web resource filename.
			myStringWebResource = remoteUri + fileName;
			Console.WriteLine("Downloading File \"{0}\" from \"{1}\" .......\n\n", fileName, myStringWebResource);
			// Download the Web resource and save it into the current filesystem folder.
			myWebClient.DownloadFile(myStringWebResource,fileName);		
			Console.WriteLine("Successfully Downloaded File \"{0}\" from \"{1}\"", fileName, myStringWebResource);
			Console.WriteLine("\nDownloaded file saved in the following file system folder:\n\t" + Application.StartupPath)

推荐答案

C:\Users\<your user name>\OneDrive


这篇关于如何使用C#在onedrive中获取文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 17:46