【发布时间】:2017-01-25 23:04:38
【问题描述】:
当我使用 robocopy 复制文件并使用选项 /IS 覆盖(如果已存在于目的地)时。它将选项视为另一个文件,如日志所示:ERROR : Invalid Parameter #4 : "C:/Program Files/Git/IS"
任何人都知道如何在 Windows 中复制文件,同时覆盖目标位置的文件。
$ robocopy "Z:\ubuntushare" "C:\Natlink\Natlink\MacroSystem" "_git.py" /IS
ROBOCOPY :: Robust File Copy for Windows
Started : Sat Sep 17 18:00:05 2016
Source - Z:\ubuntushare\
Dest - C:\Natlink\Natlink\MacroSystem\
Files : _git.py
Options : /COPY:DAT /R:1000000 /W:30
------------------------------------------------------------------------------
ERROR : Invalid Parameter #4 : "C:/Program Files/Git/IS"
Simple Usage :: ROBOCOPY source destination /MIR
source :: Source Directory (drive:\path or \\server\share\path).
destination :: Destination Dir (drive:\path or \\server\share\path).
/MIR :: Mirror a complete directory tree.
For more usage information run ROBOCOPY /?
**** /MIR can DELETE files as well as copy them !
pri@pri-PC MINGW64 /c/NatLink/NatLink/MacroSystem
【问题讨论】:
标签: windows shell batch-file git-bash robocopy