XCOPY大部分时间都没有处理所有文件。 [英] XCOPY is not coping all the files in most of the time.

查看:145
本文介绍了XCOPY大部分时间都没有处理所有文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨专家,



我试图解决这个问题差不多两天了。我正在处理由Windows调度程序在Windows Server 2008上运行的遗留.bat文件。但是XCOPY复制了3个非常轻的文件,但大多数时候它不会复制最大的文件。上周它成功地在6天内复制了所有文件。本周它没有复制三天的最大文件。这意味着它无法复制4天中最大的(1 GB)3。



XCOPY中的问题如下:



XCOPY:xcopy%bckp% \ *。* / v / e / s / c / y / z%drv%\ bckp_%day%2>>& 1 | %tee %% run%1>>%log%2>& 1



请帮助我!



-----

Shafik



我的尝试:



XCOPY不能一直工作。但我需要它来稳定。请帮帮我。

Hi Experts,

I am trying to solve this problem almost two days. I am working on legacy .bat file which is running by windows scheduler at windows server 2008. But XCOPY copies 3 files which are very light but most of the time it doesn't copy the largest file. Last week it successfully copied all files in 6 days. This week it didn't copy the largest file three days. That means it failed to copy the largest (1 GB) 3 out of 4 days.

What is the problem in the XCOPY which is given below:

XCOPY : xcopy %bckp%\*.*/v/e/s/c/y/z %drv%\bckp_%day% 2>>&1 | %tee% %run% 1>>%log% 2>&1

Please help me!

-----
Shafik

What I have tried:

XCOPY is not working all the time. But I need it to make stable. Please help me.

推荐答案

命令行中没有任何内容会导致此问题。



问题有很多原因。首先是运行此批处理文件的计算机与源和目标文件位置之间的网络连接。



接下来,当XCOPY获取时,文件可能被锁定并在使用中到文件。



查看您生成的日志文件以查看错误。



最后,不要使用XOPY。使用类似ROBOCOPY的东西,因为XCOPY不会重启复制操作是否有故障。如果出现问题,ROBOCOPY会再试一次。
There is nothing in the command line that will cause this.

The problem has a number of causes. First first being a network connection between the machine running this batch file and the source and destination file locations.

Next, the files could be locked and in use when XCOPY gets to the file.

Look in the log files you're generating to see what the errors are.

Lastly, don't use XOPY. Use something like ROBOCOPY since XCOPY will not restart the copy operation is there is a failure. ROBOCOPY will try again if there is a problem.


这篇关于XCOPY大部分时间都没有处理所有文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆