代码之家  ›  专栏  ›  技术社区  ›  Ghoul Fool

使用xcopy确定新文件

  •  0
  • Ghoul Fool  · 技术社区  · 6 年前

    我可以使用批处理文件将新文件从源文件复制到目标文件:

    xcopy "D:\myFolder" "W:\projects\myFolder" /d /y /s
    

    然而,我很感兴趣的是找出那些被认为是文件的文件(实际上不需要对它们进行处理)——这就是你复制的文本差异列表。是否可以在批处理文件中定位?

    1 回复  |  直到 6 年前
        1
  •  1
  •   aschipfl    6 年前

    xcopy /?

    Copies files and directory trees.
    
    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] [/B]
                               [/EXCLUDE:file1[+file2][+file3]...]
    [...]
      /F           Displays full source and destination file names while copying.
      /L           Displays files that would be copied.
    [...]
    

    /L /F