C# 從網頁下載檔案到指定路徑

C# 從網頁下載檔案到指定路徑

using (WebClient webClient = new WebClient())
{
    string FileOutput = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "abc.txt");
	webClient.DownloadFile("http://abc/abc.txt", FileOutput);  //儲存路徑一定要加完整路徑
}

 

留言

這個網誌中的熱門文章

ORA-12514: TNS: 監聽器目前不知道連線描述區中要求的服務

Oracle 例外控制(Exception Control)

Oracle 工作排程 DBMS_JOB 筆記