09 2019 档案
摘要:string path = @"d:\test"; if (false == System.IO.Directory.Exists(path)) { //创建pic文件夹 System.IO.Directory.CreateDirectory(path); }
阅读全文
摘要:SaveFileDialog sfd = new SaveFileDialog(); sfd.Filter = "Excel表格(*.xlsx)|*.xlsx"; sfd.FilterIndex = 1; sfd.RestoreDirectory = true; if (sfd.ShowDialog() == DialogResult.OK) { MessageBox.Show(sfd.FileN
阅读全文
摘要:string pLocalFilePath ="";//要复制的文件路径 string pSaveFilePath ="";//指定存储的路径 if (File.Exists(pLocalFilePath))//必须判断要复制的文件是否存在 { File.Copy(pLocalFilePath, pSaveFilePath, true);//三个参数分别是源文件路径,存储路径,若存储路径有相同文件
阅读全文