Solved Copying directory with Robocopy skipped too many directory and files

peter7277

New member
Member
Local time
5:17 PM
Messages
83
I was copying a directory with its sub directories and files, around 6GB, using robocopy and i was using this command:
Code:
Robocopy.exe SourceDir DestinationDir  /E /w:1 /r:1
I added the switches /w:1 /r:1 because robocopy would stop on some files and show a message for 'access denied' and waiting for 30 seconds and trying again. So i wanted to skip these type of files. But in the end it showed this:

Code:
              Total    Copied   Skipped  Mismatch    FAILED    Extras
   Dirs :     11208     10868       340         0         0         1
  Files :     73105     70551      2551         0         3         0
  Bytes :   5.792 g   5.202 g  603.35 m         0   414.5 k         0
  Times :   0:26:36   0:20:22                       0:00:03   0:06:11


  Speed :             4569716 Bytes/sec.
  Speed :             261.481 MegaBytes/min.

There are lot of files and directories skipped. How to proceed? What switches to use so i don't have that much files and directories skipped?
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
Use /V Produce verbose output, showing skipped files. so you can see whats been missed
 

My Computer My Computer

At a glance

win 8 32 bit
Computer type
PC/Desktop
OS
win 8 32 bit
access denied is usually a permissions problem, usually on the writing directory. I suggest you include

/COPYALL

which is the equivalent of /COPY:dATSOU, which copies the Data, Attributes, Timestamps, Owner, Permissions and Auditing info
 

My Computer My Computer

At a glance

Win7 pro x64stock i7 7700kCorsair Vengeance LPX 16GB (2x8GB) DDR4 @ 320...integrated Intel HD 630
Computer type
PC/Desktop
Computer Manufacturer/Model Number
diy
OS
Win7 pro x64
CPU
stock i7 7700k
Motherboard
Gigabyte Z270N-WIFI mini-ITX
Memory
Corsair Vengeance LPX 16GB (2x8GB) DDR4 @ 3200MHz
Graphics Card(s)
integrated Intel HD 630
Sound Card
onboard Realtek ALC1220
Monitor(s) Displays
two vertically mounted samsung 55" 4k un55mu8000
Screen Resolution
1920x1280
Hard Drives
256GB Samsung EVO 960 M.2 pci-e NVMe SSD
PSU
SilverStone Nightjar ST45NF 450Watt Fanless
Case
No case. Motherboard is mounted directly onto power supply
Cooling
Evercool low profile 815EP with Panaflow 12L fan at 7v
Keyboard
Ortek MCK-86 mini
Mouse
Belkin 5-button USB
Internet Speed
spectrum 400mbps
access denied is usually a permissions problem, usually on the writing directory. I suggest you include

/COPYALL

which is the equivalent of /COPY:dATSOU, which copies the Data, Attributes, Timestamps, Owner, Permissions and Auditing info

You mean i don't have to include /w:1 /r:1 switches, only /E and /COPYALL?
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
I found something confusing. I checked the properties of the both, source and destination folder, and destination folder show this:
Code:
Size: 5.80GB
Size onn disk: 5.96GB
Contains: 73.120 files, 11.209 Folders

The source folder show this:
Code:
Size: 5.79GB
Size on disk: 5.95GB
Contains: 73.105 files, 11.207 Folders

If robocopy shows that 340 directories and 2551 files are skipped the destination folder should be with smaller size, and it is not. It's even slightly bigger. How to explain this?
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
I think i found the issue with skipped files and folders. I stopped and started the robocopy command execution two or tree times, so i think the skipped files and folders are those that are already copied.

So, practically there are only 3 failed files and i found that they are in the Cygwin folder, but couldn't find which one. By the way, what is the right way to use the verbose command? I added the /V switch but it didn't show the skipped files.

But i still don't understand why the destination folder shows 15 files and 2 directories more. Is there command line tool for Windows 7 that can compare directories? I couldn't find one.
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
I prefer using FreeFileSync for copying a large number of files or even an entire disk (as long as it's data only). I found it far easier to use than Robocopy and was more reliable. Any files that failed to copy over were reported at the end of the job.
 

My Computer My Computer

At a glance

Win 7 Ultimate 64 bitIntel i7-3930KKingston HyperX Genesis 32GB Kit (8x4GB Modul...MSI R7850 Twin Frozr 2GD5/OC Radeon HD 7850 2...
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Win 7 Ultimate 64 bit
CPU
Intel i7-3930K
Motherboard
ASUS P9X79 WS
Memory
Kingston HyperX Genesis 32GB Kit (8x4GB Modules) 1600MHz DDR
Graphics Card(s)
MSI R7850 Twin Frozr 2GD5/OC Radeon HD 7850 2GB 256-bit GDDR
Sound Card
Asus Xonar Essence STX
Monitor(s) Displays
3x Asus VG248QE 24", Vizio 32" TV
Screen Resolution
1920 x 1080, ?
Hard Drives
Samsung 128GB 840 Pro SSD (1),
Samsung 4TB 850 EVO SSDs (4)
Samsung 4TB 850 EVO SSDs (16) external backup drives used in 2.5" hot swap bays in the computer.
PSU
Corsair HX750w
Case
Antec Two Hundred v2 (modified)
Cooling
Cooler Master GeminII S524 120mm (fan replaced with a 140mm)
Keyboard
Logitech G510s
Mouse
Logitech M525 (two in use)
Internet Speed
=< 32Mbps down, 8Mbps up
Antivirus
AVAST!, MBAM, SAS, Spybot S&D (all but MBAM free) Glary Util
Browser
IE11
Other Info
LSI 9211-8i HBA card (8 SATA III ports), 2.5" & 3.5" Hot Swap Bays, HooToo HT-CR001 PCI-E to USB 3.0 Internal Hub + 6 Slot Card Reader, and LG Model CH12LS28 BD-ROM Optical Drive. Also, ScanSnap S1500 ADF duplexing scanner, Canon 9000F flat bed scanner, Corsair SP2500 2.1 speakers, Samsung CLP 415nw laser color printer, Cyberpower PP2200SW UPS
You mean i don't have to include /w:1 /r:1 switches, only /E and /COPYALL?
just add /copyall to the end, keeping your other switches

But i still don't understand why the destination folder shows 15 files and 2 directories more. Is there command line tool for Windows 7 that can compare directories? I couldn't find one.
after doing copyall above, do the same robocopy command again but add on the /xo swtich. This will incrementally back up the source drive copying ONLY files that have been recently updated OR do not yet exist on the backup drive. If no files get copied, your work is done
 

My Computer My Computer

At a glance

Win7 pro x64stock i7 7700kCorsair Vengeance LPX 16GB (2x8GB) DDR4 @ 320...integrated Intel HD 630
Computer type
PC/Desktop
Computer Manufacturer/Model Number
diy
OS
Win7 pro x64
CPU
stock i7 7700k
Motherboard
Gigabyte Z270N-WIFI mini-ITX
Memory
Corsair Vengeance LPX 16GB (2x8GB) DDR4 @ 3200MHz
Graphics Card(s)
integrated Intel HD 630
Sound Card
onboard Realtek ALC1220
Monitor(s) Displays
two vertically mounted samsung 55" 4k un55mu8000
Screen Resolution
1920x1280
Hard Drives
256GB Samsung EVO 960 M.2 pci-e NVMe SSD
PSU
SilverStone Nightjar ST45NF 450Watt Fanless
Case
No case. Motherboard is mounted directly onto power supply
Cooling
Evercool low profile 815EP with Panaflow 12L fan at 7v
Keyboard
Ortek MCK-86 mini
Mouse
Belkin 5-button USB
Internet Speed
spectrum 400mbps
The hard disk from which i am copying is failing and have bad sectors. Could this cause problems? If some files are corrupt how robocopy will deal with them?
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
access denied is usually a permissions problem, usually on the writing directory. I suggest you include

/COPYALL

which is the equivalent of /COPY:dATSOU, which copies the Data, Attributes, Timestamps, Owner, Permissions and Auditing info

/COPYALL doesn't work. I still get 'Access denied' message.
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
to repair bad sectors first do this from an elevated command prompt:

chkdsk C: /f /r /x

then a couple more ideas for the access denied issue are:

one idea

xcopy /C/H/R/S/Y c:\ d:\
/C = Continues copying even if errors occur
/H = Copies hidden and system files also
/R = Overwrites read-only files
/S = Copies directories and subdirectories
/Y = Overwrites existing files without asking

second idea
Robocopy's Access Denied message can happen when a file has an NTFS stream that tags the file as having been downloaded from the Internet or copied from a share. To delete the stream tag use the Streams utility command

streams -s -d c:\

Streams - Windows Sysinternals | Microsoft Docs

all of the above assumes source drive is C: and target drive is D:
 

My Computer My Computer

At a glance

Win7 pro x64stock i7 7700kCorsair Vengeance LPX 16GB (2x8GB) DDR4 @ 320...integrated Intel HD 630
Computer type
PC/Desktop
Computer Manufacturer/Model Number
diy
OS
Win7 pro x64
CPU
stock i7 7700k
Motherboard
Gigabyte Z270N-WIFI mini-ITX
Memory
Corsair Vengeance LPX 16GB (2x8GB) DDR4 @ 3200MHz
Graphics Card(s)
integrated Intel HD 630
Sound Card
onboard Realtek ALC1220
Monitor(s) Displays
two vertically mounted samsung 55" 4k un55mu8000
Screen Resolution
1920x1280
Hard Drives
256GB Samsung EVO 960 M.2 pci-e NVMe SSD
PSU
SilverStone Nightjar ST45NF 450Watt Fanless
Case
No case. Motherboard is mounted directly onto power supply
Cooling
Evercool low profile 815EP with Panaflow 12L fan at 7v
Keyboard
Ortek MCK-86 mini
Mouse
Belkin 5-button USB
Internet Speed
spectrum 400mbps
Thanks for the help. I managed to migrate my data from the bad drive to a new drive and it seems all data is intact so far.
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
Thanks for the help. I managed to migrate my data from the bad drive to a new drive and it seems all data is intact so far.
what enabled it to work for you?
 

My Computer My Computer

At a glance

Win7 pro x64stock i7 7700kCorsair Vengeance LPX 16GB (2x8GB) DDR4 @ 320...integrated Intel HD 630
Computer type
PC/Desktop
Computer Manufacturer/Model Number
diy
OS
Win7 pro x64
CPU
stock i7 7700k
Motherboard
Gigabyte Z270N-WIFI mini-ITX
Memory
Corsair Vengeance LPX 16GB (2x8GB) DDR4 @ 3200MHz
Graphics Card(s)
integrated Intel HD 630
Sound Card
onboard Realtek ALC1220
Monitor(s) Displays
two vertically mounted samsung 55" 4k un55mu8000
Screen Resolution
1920x1280
Hard Drives
256GB Samsung EVO 960 M.2 pci-e NVMe SSD
PSU
SilverStone Nightjar ST45NF 450Watt Fanless
Case
No case. Motherboard is mounted directly onto power supply
Cooling
Evercool low profile 815EP with Panaflow 12L fan at 7v
Keyboard
Ortek MCK-86 mini
Mouse
Belkin 5-button USB
Internet Speed
spectrum 400mbps
I just used robocopy to copy all files and directories. Maybe the hard disk wasn't damaged that much.
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
Back
Top