//上傳文件到Server
FileName = FileName.Substring(FileName.LastIndexOf("\\") + 1); //取出文件名
string comp = CompanyID;
string upload_file = Server.MapPath("~/DataUpload/" + comp + "/") + System.IO.Path.GetFileNameWithoutExtension(FileName) + ".txt"; //設定檔案存放路徑
string outputFolder = Server.MapPath("~/DataUpload/" + comp + "/");
if (!Directory.Exists(outputFolder))
{
Directory.CreateDirectory(outputFolder); // create 資料夾
}
0 留言