Re: With Robocopy can I just show files that were skipped due to being newer in the destination?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"scottedwards2000" <scottedwards2000@xxxxxxxxx> wrote in message
news:9e802dbb-08f8-4e49-87d7-b4f33afd98ae@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Dec 1, 3:02 am, "Pegasus \(MVP\)" <I....@xxxxxxxxxx> wrote:
"scottedwards2000" <scottedwards2...@xxxxxxxxx> wrote in message

news:292a7016-3095-4c2e-87c2-fcd9499bd617@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Robocopy is great at showing in the output files that were skipped
because they were "Extra" (present in the destination only) -- this
appears to be the default behavior -- but the only way I seem to be
able to show files that were skipped because they are NEWER in the
destination (they are skipped because I'm using the /xo flag) is the
use the /v (verbose) flag, which shows me ALL skipped files. I don't
need to see all that because I'm using robocopy to move any new files
from a production directory to a backup directory, so of course there
will be many skipped files each time. But, I really want to guard
against the posibility that someone will put a NEW file in the backup
directory by accident instead of the Production directory, so I need
some way to quickly see the files that were skipped due to my use of
the /xo flag. Is there any way? Do I have to combine robocopy with
some text processing commands?

Standard redirection stuff:
robocopy d:\temp d:\Mon *.txt /xo /v | find /i "older"

Thanks, Pegasus.
Great suggestion -- I wasn't even aware of that find command. The
only issue is that I wanted a concise log that only listed the
exceptions, and that /v (verbose) flag causes the log to be too long.
So, using your idea, I came up with a 2-3 step solution that allows me
to have the concise log and still check for "older" files. Let me
know if you can think of a better way (although I still think Robocopy
should have as an option to show these "older" files alongside the
"extra" ones without having to use the verbose option).

1. first I run this to actually do the backup and list any Extra
files:

robocopy E:\Workspace\CW2008\Production E:\Workspace\CW2008\Backup /r:
10 /xo /log+:RoboLog.txt /s /np

and look through the log for any "EXTRA" files or directories


2. then run this to check for files not backed-up due to the
destination copy being NEWER:

robocopy E:\Workspace\CW2008\Production E:\Workspace\CW2008\Backup /r:
10 /xo /s /np /v | find /i "older"


3. if you see any output from #2, use the log from this command to
find the specific location of the file(s):

robocopy E:\Workspace\CW2008\Production E:\Workspace\CW2008\Backup /r:
10 /xo /log:RoboLogVerbose.txt /s /np /v

==============

I'm not quite with you. You write " I wanted a concise log that
only listed the exceptions", and this is precisely what the command

robocopy d:\temp d:\Mon *.txt /xo /v | find /i "older"

does: It lists the exceptions, nothing more, nothing less.


.



Relevant Pages