当我做
robocopy ./empty_folders ./empty_folders_dest /E
我看到下面的选项:
Options : *.* /S /E /DCOPY:DA /COPY:DAT /R:1000000 /W:30
如何参数/S
(不包括空目录),在那里得到的,逻辑上/E
排除(包括空目录)?倒数是(逻辑)不正确的:当我做/S
我没有看到/E
。
更多详情:
wmic datafile where name="C:\\Windows\\System32\\robocopy.exe" get Version /value
Version=10.0.16299.15
ver
Microsoft Windows [Version 10.0.16299.125]
你误解的文档。运行 “ROBOCOPY / ???”看到内置的帮助充分。
/S :: copy Subdirectories, but not empty ones. /E :: copy subdirectories, including Empty ones.
换句话说,/ S将复制子目录,除了空的。 / E将复制子目录,包括空的。
我有同样的情况,当我使用/ MIR开关,但如果没有它,这两个开关不会自动添加。因此,我建议这种情况可能与其他使用的开关。
的Robocopy与/ MIR开关:
C:\Windows\system32>ROBOCOPY F:\robocopytestv G:\robocopytestw /MIR
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Friday, February 8, 2019 19:40:01
Source : F:\robocopytestv\
Dest : G:\robocopytestw\
Files : *.*
Options : *.* /S /E /DCOPY:DA /COPY:DAT /PURGE /MIR /R:1000000 /W:30
------------------------------------------------------------------------------
6 F:\robocopytestv\
100% New File 0 New Bitmap Image.bmp
100% New File 495616 New Microsoft Access Database.accdb
100% New File 6171 New Microsoft Excel Worksheet.xlsx
100% New File 0 New Microsoft PowerPoint Presentation.pptx
100% New File 0 New Microsoft Word Document.docx
100% New File 7942 New OpenDocument Drawing.odg
New Dir 0 F:\robocopytestv\New folder\
------------------------------------------------------------------------------
Total Copied Skipped Mismatch FAILED Extras
Dirs : 2 1 1 0 0 0
Files : 6 6 0 0 0 0
Bytes : 497.7 k 497.7 k 0 0 0 0
Times : 0:00:00 0:00:00 0:00:00 0:00:00
Speed : 72818428 Bytes/sec.
Speed : 4166.703 MegaBytes/min.
Ended : Friday, February 8, 2019 19:40:01
的Robocopy而不/ MIR开关:
C:\Windows\system32>ROBOCOPY F:\robocopytestv G:\robocopytestw
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Friday, February 8, 2019 19:38:12
Source : F:\robocopytestv\
Dest : G:\robocopytestw\
Files : *.*
Options : *.* /DCOPY:DA /COPY:DAT /R:1000000 /W:30
------------------------------------------------------------------------------
6 F:\robocopytestv\
100% New File 0 New Bitmap Image.bmp
100% New File 495616 New Microsoft Access Database.accdb
100% New File 6171 New Microsoft Excel Worksheet.xlsx
100% New File 0 New Microsoft PowerPoint Presentation.pptx
100% New File 0 New Microsoft Word Document.docx
100% New File 7942 New OpenDocument Drawing.odg
------------------------------------------------------------------------------
Total Copied Skipped Mismatch FAILED Extras
Dirs : 1 0 1 0 0 0
Files : 6 6 0 0 0 0
Bytes : 497.7 k 497.7 k 0 0 0 0
Times : 0:00:00 0:00:00 0:00:00 0:00:00
Speed : 84954833 Bytes/sec.
Speed : 4861.154 MegaBytes/min.
Ended : Friday, February 8, 2019 19:38:12
的Robocopy与/ MIR和/ S开关:
C:\Windows\system32>ROBOCOPY F:\robocopytestv G:\robocopytestw /S /MIR
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Friday, February 8, 2019 19:41:17
Source : F:\robocopytestv\
Dest : G:\robocopytestw\
Files : *.*
Options : *.* /S /E /DCOPY:DA /COPY:DAT /PURGE /MIR /R:1000000 /W:30
------------------------------------------------------------------------------
6 F:\robocopytestv\
100% New File 0 New Bitmap Image.bmp
100% New File 495616 New Microsoft Access Database.accdb
100% New File 6171 New Microsoft Excel Worksheet.xlsx
100% New File 0 New Microsoft PowerPoint Presentation.pptx
100% New File 0 New Microsoft Word Document.docx
100% New File 7942 New OpenDocument Drawing.odg
New Dir 0 F:\robocopytestv\New folder\
------------------------------------------------------------------------------
Total Copied Skipped Mismatch FAILED Extras
Dirs : 2 1 1 0 0 0
Files : 6 6 0 0 0 0
Bytes : 497.7 k 497.7 k 0 0 0 0
Times : 0:00:00 0:00:00 0:00:00 0:00:00
Speed : 12432414 Bytes/sec.
Speed : 711.388 MegaBytes/min.
Ended : Friday, February 8, 2019 19:41:18
使用的Robocopy / MIR和/ E开关:
C:\Windows\system32>ROBOCOPY F:\robocopytestv G:\robocopytestw /E /MIR
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Friday, February 8, 2019 19:42:35
Source : F:\robocopytestv\
Dest : G:\robocopytestw\
Files : *.*
Options : *.* /S /E /DCOPY:DA /COPY:DAT /PURGE /MIR /R:1000000 /W:30
------------------------------------------------------------------------------
6 F:\robocopytestv\
100% New File 0 New Bitmap Image.bmp
100% New File 495616 New Microsoft Access Database.accdb
100% New File 6171 New Microsoft Excel Worksheet.xlsx
100% New File 0 New Microsoft PowerPoint Presentation.pptx
100% New File 0 New Microsoft Word Document.docx
100% New File 7942 New OpenDocument Drawing.odg
New Dir 0 F:\robocopytestv\New folder\
------------------------------------------------------------------------------
Total Copied Skipped Mismatch FAILED Extras
Dirs : 2 1 1 0 0 0
Files : 6 6 0 0 0 0
Bytes : 497.7 k 497.7 k 0 0 0 0
Times : 0:00:00 0:00:00 0:00:00 0:00:00
Speed : 72818428 Bytes/sec.
Speed : 4166.703 MegaBytes/min.
Ended : Friday, February 8, 2019 19:42:35