网站首页  汉语字词  英语词汇  考试资料  写作素材  旧版资料

请输入您要查询的考试资料:

 

标题 XCOPY的高级使用:指定日期并且用EXCLUDE排除指定文件
内容
    这篇文章主要介绍了通过dos下的XCOPY命令实现复制指定日期并且用EXCLUDE排除指定文件的代码,需要的朋友可以参考下
    1.cmd到xcopyTime.bat所在目录,执行命令xcopyTime sourceFolder DestinationFolder dateTime
    2.EXCLUDE.txt是排除的对象,不复制其中罗列的文件或文件夹
    例子:
    F:\bat>xcopyTime E:\workspace F:\website\ 06-30-2010
    EXCLUDE.txt内容,在下面的线里面
    ------------------------------
    .classpath
    .class
    .log
    ------------------------------
    
1.jpg

    代码如下:
    @echo off
    rem xcopy2.BAT transfers all files in all subdirectories of
    rem the source drive or directory (%1) to the destination
    rem drive or directory (%2)
    rem lastModifyTime (%3)
    xcopy %1 %2 /s /d:%3 /exclude:EXCLUDE.txt /y
    if errorlevel 4 goto lowmemory
    if errorlevel 2 goto abort
    if errorlevel 0 goto exit
    :lowmemory
    echo Insufficient memory to copy files or
    echo invalid drive or command-line syntax.
    goto exit
    :abort
    echo You pressed CTRL+C to end the copy operation.
    goto exit
    :exit
    ==================================================================
    .classpath
    .class
    .log
随便看

 

在线学习网考试资料包含高考、自考、专升本考试、人事考试、公务员考试、大学生村官考试、特岗教师招聘考试、事业单位招聘考试、企业人才招聘、银行招聘、教师招聘、农村信用社招聘、各类资格证书考试等各类考试资料。

 

Copyright © 2002-2024 cuapp.net All Rights Reserved
更新时间:2025/5/17 11:26:02