Link to home
Start Free TrialLog in
Avatar of Albert Widjaja
Albert WidjajaFlag for Australia

asked on

Unable to copy from one HDD to another with simple Robocopy script ?

Hi All,

When I tried to copy from one Removable USB HDD to another, it failed with the logs:

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

  Started : Monday, 12 June 2017 4:35:38 PM
   Source : F:\
     Dest : X:\

    Files : *.*
	    
  Options : *.* /DCOPY:DA /COPY:DAT /Z /J /MT:16 /R:1000000 /W:30 

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


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

               Total    Copied   Skipped  Mismatch    FAILED    Extras
    Dirs :         1         1         1         0         0         0
   Files :         0         0         0         0         0         0
   Bytes :         0         0         0         0         0         0
   Times :   0:00:00   0:00:00                       0:00:00   0:00:00
   Ended : Monday, 12 June 2017 4:35:38 PM

Open in new window




This is my Robocopy command:
C:\>Robocopy F:\ X:\ /Z /J /mt:16 /LOG:"C:\Logs\F-X-COPY-log.txt"

 Log File : C:\Logs\F-X-COPY-log.txt

C:\>

Open in new window


Any help would be greatly appreciated.

Thanks,
Avatar of nobus
nobus
Flag of Belgium image

are both drives accessible from windows explorer?  can you copy a file from/to both?
Avatar of Albert Widjaja

ASKER

yes both are accessible.
The cmd prompt is already opened, as the local administrator.
SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, that works.
how to show the progress on the display and log the error files only ?
and if I run the same script, does it skip the files already copied over to the destination drive ?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks OBDA,

So I assume, if I run the script below for the second time, it will just skip the file which has been copied, but then copy whatever new on the source to the destination drive ?

Robocopy F:\ X:\ /E /R:0 /J /mt:16 /NFL /NDL /NP /LOG:"C:\Logs\F-X-COPY-log.txt"

Open in new window


As at the moment, the script only copies between two removable HDD using USB connectivity on the server.
Avatar of oBdA
oBdA

Yes; robocopy will by default skip files that already exist in the target folder, and where the size and modification date are the same.
Note that if you you want the target folder to be identical to the source, you need /mir instead of /e; this will delete files in the target(!) that don't exist anymore in the source.
Hi Obda,
In that case, I will leave it with /E because I don't want to delete  the files on the destination drive.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you :-)