private void deployToServ_Click(object sender, EventArgs e) { //string myString = @"C:\Users\LG\Desktop\개발\LocationTXT.txt"; // for testing string myString = @"C:\Users\mes_adm01\Desktop\배포프로그램실행\LocationTXT.txt"; // for production var utf8 = Encoding.UTF8; byte[] utfBytes = utf8.GetBytes(myString); myString = utf8.GetString(utfBytes, 0, utfBytes.Length); string text = File.ReadLines(myString).First(); var aSplit = text.Split(','); string plant = aSplit[0].Trim(); string sourcelocation = aSplit[1].Trim(); string tempdirectory = aSplit[2].Trim(); string targetlocation = aSplit[3].Trim(); string backupDir = aSplit[4].Trim(); ResultLabel.Text = ""; DeployResultList = new List <PlantDeployResult>(); // 안 해주면 에러 Directory.Delete(tempdirectory, true); Directory.CreateDirectory(tempdirectory); ParentForm.CloneDirectory(sourcelocation, tempdirectory); Deploy(plant, tempdirectory, targetlocation, backupDir); isFirstRun = true; ResultLabel.Text = "배포완료"; DeployResultView.DataSource = DeployResultList; // DeployResultView.DataSource = DeployResultList; }