Invalid parameter Robocopy # 3

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 shows

-------------------------------------------------------------------------------
   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 solve this problem.

+4
source share
1 answer

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 specified path stops on a new one, which is immediately before the first space.

+4
source

Source: https://habr.com/ru/post/1537348/


All Articles