Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Robocopy invalid parameter #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'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

like image 312
Vishnu Murali Avatar asked Apr 21 '14 10:04

Vishnu Murali


1 Answers

You need to quote paths with spaces special chars (space, dot, parenthesis, ...) (edit following first comment) :

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.

like image 109
Mat M Avatar answered Sep 28 '22 04:09

Mat M