使用xcopy遇到的一个问题
2009-11-18 13:54
585 查看
我需要从远端的服务器拷贝一个大的目录(>1G)到本机,在Console中我使用了xcopy命令。过了几十分钟之后,在copy一个大的文件(大约500M)时出现了错误:
File creation error - the specified network name is no longer available.
不知道这个错误什么意思,在google上搜索了一下,找到了一篇好的文章:http://www.xxcopy.com/xxgroup/m08/msg08400.htm。Garry很细心,对很多情况进行了测试。得出的结果是:造成这个错误是由于网络连接不好导致的。没有办法,只能让远程机器开一个ftp给我用。
我把这篇文章贴在最后:
File creation error - the specified network name is no longer available.
不知道这个错误什么意思,在google上搜索了一下,找到了一篇好的文章:http://www.xxcopy.com/xxgroup/m08/msg08400.htm。Garry很细心,对很多情况进行了测试。得出的结果是:造成这个错误是由于网络连接不好导致的。没有办法,只能让远程机器开一个ftp给我用。
我把这篇文章贴在最后:
--- In xxcopy@yahoogroups.com, "dcohn99" wrote: > As to your very detailed response, thank you, but my question > still comes down to why are other applications able to display > and/or copy the files from the system in question. Examples > like Dir and xcopy. I did some testing across a lan using a similar setup as Doug has described although I don't have an ME machine so couldn't duplicate it exactly. To simulate a network problem, I tried two methods: 1. I removed the cable - permanent disconnection 2. On the remote PC, I closed the connection several times with a NET SESSION //PC /D /Y. This results in a brief disconnection until windows re-establishes the connection. Here's a summary of what I tried and the results. In each case, the source was a remote PC (either mapped to a drive or via UNC) and the dest was local. The xxcopy/xcopy command was a simple copy to an empty destination. The source consisted of 19 files between 1.5Mb and 4.2Mb. Test 1. ======= src=mapped drive on W2k dst=local NT4 command=xxcopy n:/test/ d:/test/ /bu/pb/onxxcopy.log/oe3 1. When the plug was pulled, xxcopy/windows waited approx 90secs then terminated with exit code 101. The error reported by xxcopy was #240 "Unspecified system error". NET HELPMSG 240 gives this as "The session was cancelled". Not all files were copied. If the cable was re-connected during the wait state, the copying continued unabated and terminated normally. 2. When the session was closed, xxcopy immediately issued a "Copy failed" message on the console then the copying continued with the next file and terminated with exit code 100+no of failed copies and error #240 as for 1. Test 2. As for 1 but swapped PC's ======= src=mapped drive on NT4 dst=local W2k command=xxcopy n:/test/ d:/test/ /bu/pb/onxxcopy.log/oe3 1. When the plug was pulled, xxcopy/windows waited approx 90secs then terminated with exit code 101. The error reported by xxcopy was #64 "The specified network name is gone". NET HELPMSG 64 gives this as "The specified network name is no longer available" If the cable was re-connected during the wait state, the copying continued unabated and terminated normally. 2. When the session was closed, xxcopy immediately issued a "Copy failed" message on the console then the copying continued with the next file and terminated with exit code 100+no of failed copies and error #64 as for 1 but on one occassion gave error #6 "Incorrect internal file identifier". NET HELPMSG 6 gives this as "The handle is invalid". Test 3. As for 2 but using /cr30 ======= src=mapped drive on NT4 dst=local W2k command=xxcopy n:/test/ d:/test/ /bu/pb/onxxcopy.log/oe3/cr30 2. Exactly the same as above i.e. /cr30 had no effect. Test 4. As for 3 but using UNC src ======= src=UNC drive on NT4 dst=local W2k command=xxcopy //pc/d/test/ d:/test/ /bu/pb/onxxcopy.log/oe3/cr30 2. Exactly the same as above i.e. UNC made no difference. Test 5. As for 2 but using xcopy ======= src=mapped drive on NT4 dst=local W2k command=xcopy n:/test/* d:/test/ /s/c 1. When the plug was pulled, xcopy/windows waited approx 50secs then terminated with exit code 0!! The console listed multiple "Unable to create directory ....." followed by "File creation error - the network path was not found". If the cable was re-connected during the wait state, the copying continued unabated and terminated normally. 2. When the session was closed, xcopy continued with the copy and copied the files normally. However if the session was closed repeatedly with no pause between each closure, xcopy issued a "File creation error - the specified network name is no longer available" (this is the same as #64 above). If the session was left to then re-establish itself, xcopy continued copying the remaing files and terminated with exit code 0. So the conclusions that might be drawn from this. 1. The #error codes reported by windows/xxcopy with /oe3 are system dependent. NT4 reported different error numbers to W2k for the same error condition. The #error codes reported by Doug on ME are different again however the descriptions in all cases are similar. 2. Xxcopy reports a 101 "success" code even when the cable is pulled and the source is permanently lost. Xxcopy then stops copying (or trying to copy) any further files and terminates. This is however a lot better than xcopy's 0 exit code although it does at least list the file names of the failed copies to the console. 3. Xxcopy doesn't re-try on failed network access errors even temporary disconnects. Xcopy does wait for a while (not certain how long - about 5-10 secs). 4. Don't rely on either xxcopy's or xcopy's exit code as the sole determinant of the success or failure of a network copy. Xxcopy exit code 101 or higher may be a critical error. Xcopy exit code 0 may be a critical error. I guess system admins need to make sure they use /oe2 or /oe3 and check the logs for critical #error_nos. 5. I'm not sure why xxcopy terminates when the network cable is disconnected and a #64 error results but continues when the session is closed and a #64 error results. Similarly, I don't know why xxcopy/windows waits 90 secs on a cable disconnect but xcopy waits 50 secs. Maybe there is further status checking within xxcopy which determines whether xxcopy terminates. 6. I couldn't replicate Doug's #55 error which resulted in a termination of xxcopy but presumably it is similar to the W2k #64 errors and the status reports look like a permanent disconnection on an ME system. Garry
相关文章推荐
- 使用lua和tolua++遇到的一个古怪问题
- 面试时候遇到的一个问题:禁用cookie后还能使用session吗?
- Unicode文件头的标识 - 使用IHtmlViewer 接口时遇到的一个问题
- struts中使用DispatchAction可能会遇到的一个问题
- 使用spring jdbc遇到的一个性能问题
- oracle数据库使用wm_concat()函数时遇到的一个问题
- 使用composer安装Yii 2.0时遇到的一个问题
- .net 使用mysql 遇到的一个问题
- php关于使用iconv(...)函数对字符进行中文转换时,遇到的一个问题
- 在使用struts遇到的一个问题
- myeclipse中使用debug时遇到的一个小问题
- iOS 使用协议委托遇到的一个小问题
- 记录在eclipse中使用ant遇到到的一个小问题
- 使用Android studio转换Jar包时,遇到的一个问题Could not find tools.jar.
- 刚开始使用struts2,遇到一个问题
- CentOS7 使用 yum 安装 mysql 遇到的一个问题
- js 遇到的问题-使用for循环给同一个文本框赋值
- 2017-10-11-jquery-使用ajax传递参数遇到的一个问题
- 在使用WINSOCK2.H头文件时遇到的一个奇怪问题
- 经常遇到的一个问题是 MFC中开启多线程后 在非主线程中使用updata函数出现崩溃的情况。