本文介绍了我正在将文件本地系统复制到另一个系统,但它不是copping ..,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

File.Copy(E:\\Cockdata.xls,\ Attendance \\Cockdata.xls,true);



出勤 - >文件夹名称。其文件夹是共享文件夹

File.Copy("E:\\Cockdata.xls", "\Attendance\\Cockdata.xls", true);

Attendance --> folder name. its folder is share folder

推荐答案



File.Copy("E:
\\Cockdata.xls", "10.1.10.15\\Attendance\\Cockdata.xls", true);



,这几乎是正确的。几乎:在servername / ip之前,你需要一个双反斜杠。


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.


这篇关于我正在将文件本地系统复制到另一个系统,但它不是copping ..,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 14:52