Why did you make your question worse when you did "improve" it?
Originally, it was
File.Copy("E:
\\Cockdata.xls", "10.1.10.15\\Attendance\\Cockdata.xls", true);
and that's almost correct. Almost: before the servername / ip, you need a double backslash.
File.Copy(@"E:\Cockdata.xls", @"\\10.1.10.15\Attendance\Cockdata.xls", true);
Note: the "@" character before a string helps with backslashitis.