XCopy命令实现增量备份

xcopy

XCOPY是COPY的扩展,可以把指定的目录连文件和目录结构一并拷贝,但不能拷贝系统文件;使用时源盘符、源目标路径名、源文件名至少指定一个;选用/S时对源目录下及其子目录下的所有文件进行COPY。除非指定/E参数,否则/S不会拷贝空目录,若不指定/S参数,则XCOPY只拷贝源目录本身的文件,而不涉及其下的子目录;选用/V参数时,对拷贝的扇区都进行较验,但速度会降低。

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W]
                           [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U]
                           [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z]
                           [/EXCLUDE:file1[+file2][+file3]...]

  source       指定要复制的文件。
  destination  指定新文件的位置和/或名称。
  /A           只复制有存档属性集的文件,
               但不改变属性。
  /M           只复制有存档属性集的文件,
               并关闭存档属性。
  /D:m-d-y     复制在指定日期或指定日期以后更改的文件。
               如果没有提供日期,只复制那些源时间
               比目标时间新的文件。
  /EXCLUDE:file1[+file2][+file3]...
               指定含有字符串的文件列表。每一个字符串
               必须在文件的单独行中。如果有任何
               字符串与要被复制的文件的绝对路径
               相符,那个文件将不会得到复制。
               例如,指定如 \obj\ 或 .obj 的字符串会排除
               目录 obj 下面的所有文件或带有
               .obj 扩展名的文件。
  /P           创建每个目标文件前提示。
  /S           复制目录和子目录,除了空的。
  /E           复制目录和子目录,包括空的。
               与 /S /E 相同。可以用来修改 /T。
  /V           验证每个新文件。
  /W           提示您在复制前按键。
  /C           即使有错误,也继续复制。
  /I           如果目标不存在,又在复制一个以上的文件,
               则假定目标一定是一个目录。
  /Q           复制时不显示文件名。
  /F           复制时显示完整的源和目标文件名。
  /L           显示要复制的文件。
  /G           允许将没有经过加密的文件复制到
               不支持加密的目标。
  /H           也复制隐藏和系统文件。
  /R           覆盖只读文件。
  /T           创建目录结构,但不复制文件。
               不包括空目录或子目录。/T /E 包括
               空目录和子目录。
  /U           只复制已经存在于目标中的文件。
  /K           复制属性。一般的 Xcopy 会重置只读属性。
  /N           用生成的短名复制。
  /O           复制文件所有权和 ACL 信息。
  /X           复制文件审核设置(隐含 /O)。
  /Y           复制文件审核设置(隐含 /O)。
               现存目标文件。
  /-Y          导致提示以确认改写一个
               现存目标文件。
  /Z            用重新启动模式复制网络文件。

命令行开关 /Y 可以预先在 COPYCMD 环境变量中设置。
这可能被命令行上的 /-Y 改写。

例子:

XCOPY E:\vstsworkspace\source\web\resource C:\home\site\web\ /s /e /h /r /k /y /d /exclude:exclude.txt>tempTips.txt 

上面命令实现:

1、把C:\home\site\web\ 下的文件增量复制到E:\vstsworkspace\source\web\resource

2、并且是剔除exclude.txt的。

3、把复制的文件名都写到tempTips.txt文件中

转载于:https://www.cnblogs.com/pachongshangdexuebi/p/5051977.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/543826.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

dbms_DBMS | 并发控制

dbmsManagement of concurrent transaction execution is known as “Concurrency Control”. Transaction management in DBMS handles all transaction, to ensure serializability and isolation of transaction. DBMS implement concurrency control technique so that the…

ruby 发送post请求_使用Ruby发送电子邮件

ruby 发送post请求Ruby发送电子邮件 (Ruby sending email) Sending emails and routing email among mail servers are handled by Simple Mail Transfer Protocol commonly known as SMTP. Net::SMTP class is a predefined class in Ruby’s library which is purposefully d…

Centos Git1.7.1升级到Git2.2.1

Centos Git1.7.1升级到Git2.2.1安装需求:># yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc ># yum install asciidoc xmlto -y ># yum install gcc perl-ExtUtils-MakeMaker error: /utf8.c:463: undefined r…

tgc 什么意思 tgt_TGT的完整形式是什么?

tgc 什么意思 tgtTGT:训练有素的研究生老师 (TGT: Trained Graduate Teacher) TGT is an abbreviation of Trained Graduate Teacher. It is a title, not a teaching program that is given to a graduate person who has done completion of training in teaching…

svn的使用(Mac)

2019独角兽企业重金招聘Python工程师标准>>> 从服务器下载代码 在终端中输入svn checkout svn://localhost/mycode --username用户名 --password密码 /Users/apple/Documents/code指令意思:将服务器中mycode仓库的内容下载到/Users/apple/Documents/myCo…

scala语言示例_标有示例的Scala关键字

scala语言示例Scala | 任一关键字 (Scala | Either Keyword) Either is a container similar to the option which has two values, they are referred to as children. The left and right children are named as the right child and left child. 这是一个类似于选项的容器&a…

css 中文文字字体_使用CSS的网络字体

css 中文文字字体CSS | 网络字体 (CSS | Web fonts) Web fonts allow people to use fonts that are not pre-installed in their computers. When you want to include a particular font simply include the font file on your browser and it will be downloaded. Web字体允…

Ajax实践之用户是否存在

关于Ajax在之前的学习中,已经对它的基础知识有了初步的了解。仅仅是欠实践。那么接下来就让实践来检验一下真理吧! 基础见:http://blog.csdn.net/liu_yujie2011com/article/details/29812777 那么先回忆一下,Ajax是用来解决什么问…

vb 导出整数 科学计数法_可整数组的计数

vb 导出整数 科学计数法Problem statement: 问题陈述: Given two positive integer n and m, find how many arrays of size n that can be formed such that: 给定两个正整数n和m ,找出可以形成多少个大小为n的数组: Each element of the …

C4.5决策树算法概念学习

数据挖掘一般是指从大量的数据中自动搜索隐藏于其中的有着特殊关系性的信息的过程。 •分类和聚类•分类(Classification)就是按照某种标准给对象贴标签,再根据标签来区分归类,类别数不变。•聚类(clustering)是指根据“物以类聚”的原理,将本…

python修改y轴刻度_Python | Y轴刻度限制

python修改y轴刻度In some cases, we need to visualize our data within some defined range rather than the whole data. For this, we generally set the y-axis scale within a limit and this ultimately helps us to visualize better. Sometimes, it acts as zooming a…

em算法示例_带有示例HTML'em'标签

em算法示例<em>标签 (<em> Tag) <em> tag in HTML is used to display the text in emphasized form. <em> tag add semantic meaning to the text, text inside it is treated as emphasized text. HTML中的<em>标记用于以强调形式显示文本。 &…

联合使用 HTML 5、地理定位 API

查找并跟踪位置坐标以用在各种 Web 服务中 在这个由五个部分所组成的系列的第一部分中&#xff0c;您将接触到移动 Web 应用程序中最流行的新技术&#xff1a;地理定位。高端智能手机都内置 GPS&#xff0c;现在您将了解 Web 服务如何使用它。在本文中&#xff0c;您将学到如何…

list下界_下界理论

list下界下界理论 (Lower Bound Theory) Lower bound (L(n)) is a property of the specific problem i.e. the sorting problem, matrix multiplication not of any particular algorithm solving that problem. 下界(L(n))是特定问题(即排序问题)的矩阵&#xff0c;不是解决该…

Mac OSX 安装nvm(node.js版本管理器)

我的系统 1.打开github官网https://github.com/&#xff0c;输入nvm搜索,选择creationix&#xff0f;nvm&#xff0c;打开 2.找到Install script&#xff0c;复制 curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash . 3. 打开终端&#xf…

HTML中的类属性

The class attribute in HTML is used to specify or set a single or multiple class names to an element for an HTML and XHTML elements. Its majorly used to indicate a class in a style sheet. HTML中的class属性用于为HTML和XHTML元素指定或设置一个元素名称或多个类…

关于HTML5标签不兼容(IE6~8)

HTML5的语义化标签以及属性&#xff0c;可以让开发者非常方便地实现清晰的web页面布局&#xff0c;加上CSS3的效果渲染&#xff0c;快速建立丰富灵活的web页面显得非常简单。 比较常用的HTML5的新标签元素有&#xff1a; <header>定义页面或区段的头部&#xff1b;<na…

zzz,zzz,zz9_ZZZ的完整形式是什么?

zzz,zzz,zz9ZZZ&#xff1a;睡觉&#xff0c;无聊&#xff0c;累 (ZZZ: Sleeping, Bored, Tired) ZZZ is an abbreviation of "Sleeping, Bored, Tired". ZZZ是“睡觉&#xff0c;无聊&#xff0c;累了”的缩写 。 It is an expression, which is commonly used in …

uboot启动 及命令分析(3)

u-boot命令 先贴一个重要结构,位于uboot/include/command.h,这个结构代表每个uboot命令 struct cmd_tbl_s { char *name; /* Command Name */ int maxargs; /* maximum number of arguments*/ int repeatable;/* autorepeat allowed? */ /* Implem…

Mozilla开源了VR框架A-Frame

Mozilla创建并开源了A-Frame&#xff0c;这是一个用于在桌面浏览器、智能手机和Oculus Rift上创建VR场景的框架。\\A-Frame是一个在浏览器中创建VR体验的开源框架。该框架由Mozilla的MozVR团队创建和开发。A-Frame使用了一个在游戏开发中经常使用的“实体-组件&#xff08;Enti…