protected void btn_FileMove_Click(object sender, EventArgs e)
{
try
{
//檔案已存在的FileMove
File.Move(txtFilePath.Text, txtPathTarget.Text);
//IOException未處理,檔案已存在時,無法建立該檔案。
}
catch (IOException ex)
{
Label1.Text = ex.ToString();
//MessageBox.Show(ex.ToString());
}
}
protected void btn_FileCopy_Click(object sender, EventArgs e)
{
//檔案已存在的FileCopy
//File.Copy(txtFilePath.Text, txtPathTarget.Text);
//IOException未處理,檔案 'D:\TEST.docx' 已經存在。
//改寫為
File.Copy(txtFilePath.Text, txtPathTarget.Text, true);
}
2017年8月15日 星期二
訂閱:
張貼留言 (Atom)
WPF聊天室应用(ASP.NET Core SignalR)
WPF聊天室应用(ASP.NET Core SignalR) https://www.bilibili.com/video/BV1Q741187Si?p=2 https://www.bilibili.com/video/BV1UV411e75T?from=search...
-
https://dotblogs.com.tw/v6610688/2015/02/19/iis_office_access_word_excel_com_interop_api_configuration https://dotblogs.com.tw/gelis/archi...
-
key: Network Sniffer in .NET https://www.google.com/search?q=Network+Sniffer+in+.NET&oq=Network+Sniffer+in+.NET&aqs=chrome..69i57...
-
https://www.cnblogs.com/wangshenhe/archive/2012/05/25/2516842.html https://www.youtube.com/watch?v=oCtTgYak2Rw 【分析】淺談C#中Control的Invoke與...
沒有留言:
張貼留言