Quote:
Could not find a part of the path 'xx.xx.x.xx\shared\abc_1.zip'
Isn't it obvious?
You need to pass the correct path in order to access the file, otherwise it will always be a 404. I can suggest that you consider using
Path.Combine
[
^] to remove maximum of errors while generating the paths for working.
fileName = @"D:\abc" + "_" + (i + 1) + ".zip";
fname = "abc" + "_" + (i + 1) + ".zip";
File.Copy(fileName, txtIP.Text + @"\shared\" + fname);
Also, check again, whether the file exists there or not; the problem (IMO) is not with authentication,
it says there is something extra or missing in the path.
c# - "Could not find part of the path" error when copying a file - Stack Overflow[
^]