We help IT Professionals succeed at work.

Robocopy missing files/folders

Have an issue where ROBOCOPY missing files in folders and not copying all directories.. current command is this

robocopy \\server\D$ D:\ /e /b /copyall /PURGE /r:5 /w:5 /MT:64 /tee /log+:D:\log_ShareName _%date:~-10,2%"-"%date:~7,2%"-"%date:~-4,4%.txt /v


its not logging the files its copying either.. i get 2 entries, basically start and stop entries.  Latest entry

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

  Started : Tuesday, March 3, 2020 12:48:14 PM
   Source : \\Server\D$\
     Dest : D:\

    Files : _03-03-2020.txt
          
  Options : /V /TEE /S /E /COPYALL /PURGE /B /MT:64 /R:5 /W:5

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

      *EXTRA Dir        -1      D:\Logs\
        *EXTRA File                 1343      D:\Logs\log_ShareName
             named      -1      \\server\D$\System Volume Information\

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

               Total    Copied   Skipped  Mismatch    FAILED    Extras
    Dirs :     24894     24893     24894         0         0         1
   Files :         0         0         0         0         0         1
   Bytes :         0         0         0         0         0     1.3 k
   Times :   0:02:06   0:00:00                       0:00:00   0:02:06
   Ended : Tuesday, March 3, 2020 12:50:21 PM




am I missing something?
Comment
Watch Question

End-user support
CERTIFIED EXPERT
Commented:
One thing to check, your log filename. I changed your quotes to just wrap around the entire filename:
robocopy \\server\D$ D:\ /e /b /copyall /PURGE /r:5 /w:5 /MT:64 /tee /log+:"D:\log_ShareName_%date:~-10,2%-%date:~7,2%-%date:~-4,4%.txt" /v

Author

Commented:
that shouldn't have anything to do with missing files/directories right?
NVITEnd-user support
CERTIFIED EXPERT

Commented:
Should be quick to find out. Do it by robocopying one of the missing folders, i.e. so you don't have to do the whole thing.
Philip ElderTechnical Architect - HA/Compute/Storage
CERTIFIED EXPERT

Commented:
www.scootersoftware.com

BeyondCompare v4. It's a GUI. It tells you what's good and what's not.

We use it for all of our file/folder migrations large and small.
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
You are telling robocopy to delete folders on D: that do not exist in the source.
You are logging the info into D:\log_sharename

/e /purge is the same as /MIR

You should not write the log on the same driver where you are mirroring the contents from a source.

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy

Consider writing the log yo another drive, or  create a subfolder D:\Server_D_drive into which you are copying data.
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Oh, note your log filename breaks up such that instead of *.* a portion of the log filename is being set as the search criteria, filter for the tikes.

Add '*.*' before /e of your command, or the modified example NVIT provided.