Robocopy invalid parameter #3

Vishnu Murali picture Vishnu Murali · Apr 21, 2014 · Viewed 25.2k times · Source

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

Answer

Mat M picture Mat M · Apr 21, 2014

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.