0
메신저 코드를 사용하여 서버 PC의 데이터베이스에서 파일을 복사합니다. 그래서 그 서버에 IP 주소를 통해 액세스하지만 그것은 내 오류를주고 내 PC (클라이언트 PC)의 폴더에있는 파일을 복사하지 않는 내 사용하는 코드는 ... 내가 어디서 잘못 말할 수 있습니까 ??네트워크 액세스 서버에서 .net의 클라이언트 PC로 데이터베이스 파일을 복사하는 방법은 무엇입니까?
파일 경로의 WinForm 내 목록보기에 기재되어 있습니다 ..
버튼 클릭 이벤트에public string RecordingFileCopy(string recordpath,string ipadd)
{
string strFinalPath;
strFinalPath = String.Format("\\{0}'{1}'",ipadd,recordpath);
return strFinalPath;
}
....
{
try
{
foreach (ListViewItem item in listView1.Items)
{
string sourceFile = item.SubItems[5].Text;
RecordingFileCopy(sourceFile,"10.0.4.123");
File.Copy(sourceFile, Path.Combine(@"E:\name\MyDir", Path.GetFileName(sourceFile)));
}
}
catch
{
MessageBox.Show("Files are not copied to folder", _strMsg, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
throw되는 예외를 지정하십시오. catch (Exception ex) -> print that – TimothyP