File synchronization tool that comes with Windows system

1. Basic environment

  Operating system: Microsoft Windows 10 and Microsoft Windows Server 2019 and above

2. Applicable scenarios

  Sometimes we need to synchronize the contents of two folders. There are many file synchronization software on the market, both paid software and free software. The tool robocopy that comes with the Windows system can complete the above work. The Chinese translation is: reliable file copying of Windows. After the execution is completed, there will be an execution result report.

3. Common instructions

  1. Simple usage

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Windows 的可靠文件复制
-------------------------------------------------------------------------------
  开始时间: 2023年3月5日 17:23:11
            简单用法:: ROBOCOPY source destination /MIR
                 源:: 源目录(驱动器:\路径或\\服务器\共享\路径)
               目标:: 目标目录(驱动器:\路径或\\服务器\共享\路径)
              /MIR:: 镜像完整目录树。
    有关用法的详细信息,请运行 ROBOCOPY /?
****  /MIR 可以删除文件也可以复制文件!

   Note: The /mir parameter will delete files in the target directory that are not in the source directory. Please operate with caution when using it. If you do not want to delete files in the target directory that are not in the source directory, please remove this parameter.

PS C:\Users\YangQun> robocopy D:\0000 D:\1111

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Windows 的可靠文件复制
-------------------------------------------------------------------------------

  开始时间: 2023年3月5日 17:36:47
        源: D:\0000\
      目标: D:\1111\

      文件: *.*

      选项: *.* /DCOPY:DA /COPY:DAT /R:1000000 /W:30

------------------------------------------------------------------------------

                           1    D:\0000\
100%        新文件                  9564        help.txt

------------------------------------------------------------------------------

                  总数        复制        跳过       不匹配        失败        其他
       目录:         1         0         1         0         0         0
       文件:         1         1         0         0         0         0
       字节:     9.3 k     9.3 k         0         0         0         0
       时间:   0:00:00   0:00:00                       0:00:00   0:00:00


       速度:             1912800 字节/秒。
       速度:             109.451 MB/分钟。
   结束时间: 2023年3月5日 17:36:47

PS C:\Users\YangQun>

4. Reference materials

  robocopy comes with help: robocopy /?

おすすめ

転載: blog.csdn.net/u011046671/article/details/129348728