Robocopy invalid parameter #3

女生的网名这么多〃 提交于 2019-12-07 06:12:10

问题


Here is my batch content

Robocopy.exe D:\IDRIVE\New backups\Program\full\1  D:\IDRIVE\New backups\Program\full\2

pause

But in cmd it's showing

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows   
-------------------------------------------------------------------------------

  Started : Mon Apr 21 15:24:47 2014

   Source - D:\IDRIVE\New\
     Dest - D:\IDRIVE\New backups\Program\full\backups\Program\full\2\

    Files :
  Options : /COPY:DAT /R:1000000 /W:30

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

ERROR : Invalid Parameter #3 : "D:\IDRIVE\New"

       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 !

D:\IDRIVE\New backups\Program\full>pause
Press any key to continue . . .

Please help Me to solve this issue


回答1:


You need to quote paths with spaces:

Robocopy.exe "D:\IDRIVE\New backups\Program\full\1" "D:\IDRIVE\New backups\Program\full\2"

If you look at the error message, you will see that the mentioned path stops at new, which is just before the first space.



来源:https://stackoverflow.com/questions/23195109/robocopy-invalid-parameter-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!