Ankit Agarwal

Ankit Agarwal

  • NA
  • 379
  • 247.3k

How to copy data or file from one computer to local server?

Dec 28 2016 3:47 AM
Hello,
 
How to copy data or file from one computer to local server using c#.net windows application?
i have tried this code but not coping.
my code:-
 
string ipAddress = txtIP.Text;
//int port = int.Parse(txtPort.Text);
for (int i = 0; i < arrayList.Count; i++)
{
using (Ionic.Zip.ZipFile zip = new Ionic.Zip.ZipFile())
{
zip.AddDirectory(arrayList[i].ToString());
//zip.Save(@"D:\abc" + "_" + (i + 1) + ".zip");
zip.Save(@"D:\abc" + "_" + (i + 1) + ".zip");
fileName = @"D:\abc" + "_" + (i + 1) + ".zip";
File.Copy(fileName, txtIP.Text + "shared");
MessageBox.Show("Files zipped");
}
}
 
Please help me.
How to resolve this issue?
 
Thanks in Advance.
 
Ankit Agarwal
Software Engineer 

Answers (6)