DOS命令COPY与XCOPY有什么区别

内部命令COPY与外部命令XCOPY在作用及使用方法上有什么区别?

首先说一下内外部命令的区别,内部命令是在启动DOS后调入计算机内存中常驻的,外部命令是刻在磁盘上面的,使用时内部命令可以在每一个盘符下从内存直接执行,而外部命令执行时除了外部命令所在目录及设定好路径的盘符下执行外,在其它位置执行都需要指明此命令所在路径,执行时都是从磁盘调入内存来执行。

至于COPY和XCOPY的区别是:用copy来拷贝批量文件时,如:COPY C:\*.* D:命令,这个命令所拷贝的是C:盘下的不包括文件夹(及文件夹内的文件)的所有文件至D盘;而用XCPOY来拷贝批量文件时,如:XCOPY C:\*.* D:命令,这个命令所拷贝的是C盘下的所有文件至D盘,包括文件夹、文件夹中的所有文件,文件夹中的文件夹,文件夹中的文件夹中的所有文件。


在项目过程中,使用XCOPY产生了 一个问题:

Q: DOS下使用XCOPY C: D: /E 时,提示Cannot perform a cyclic copy为什么

A: 当用户在XCOPY中使用/e参数时,拷贝目标不能是拷贝源的子目录
 Notes, If you are using the /e option, check to see if the first name given refers to an existing directory.
 This error occurs when you're trying to copy or xcopy all directories and files and that directory also contains the directory you're copying all the files to. If this command were to be allowed it would get into a loop and would never stop copying the same files over and over. When using the xcopy command if you're copying all subdirectories you must copy those files and folders to a completely separate directory or drive

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值