Re: Robocopy - not providing destination in log output
- From: "Pegasus [MVP]" <news@xxxxxxxxxxxxx>
- Date: Fri, 19 Jun 2009 13:06:18 +0200
I recommend you modify your command by ommitting the following switches:
- The second /np (it's duplicated)
- The second /r:3 (it's duplicated)
- The second /w:3 (it's duplicated)
- /njh (so that you can see the header).
You will then see the following report:
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows :: Version XP010
-------------------------------------------------------------------------------
Started : Fri Jun 19 13:00:37 2009
Source : C:\MYOB105\
Dest = d:\Fri\ *** This is the target folder ***
Files : *.exe
Options : /NS /NC /NDL /NJS /COPY:DAT /NP /IS /IT /R:3 /W:3
------------------------------------------------------------------------------
C:\MYOB105\drvwd32.exe
C:\MYOB105\drvxl32.exe
C:\MYOB105\DZPROG32.exe
C:\MYOB105\Myob.exe
C:\MYOB105\Myobopt.exe
C:\MYOB105\Myobupg.exe
If you don't want the header in your log file then you can write a simple
script that does the following:
- It reads the header
- It notes the target folder
- It writes the names of all copied files to a second log file, complete
with the target folder name on each line.
"JMic" <JMic@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F174AA43-A64B-4CDA-B0C8-DC4728039C76@xxxxxxxxxxxxxxxx
I am sorry but I am not understanding what you are referring to when you
say
"The destination directory is shown right up the top". Are you referring
to
what is reported in the job summary or the job header? I have seen this in
the job summary but do not want all of the other information that comes
with
adding this. Clearly the information is available through Robocopy but how
do
I extract/parse this information into a simple log file? Here is a copy of
the syntax I am using currently:
echo %time%___%yr%_%mth%_%day% >>TodaysPages.log
C:\Utilities\robocopy C:\TEMP C:\TEMP\PrintSites na*.pdf /NP /R:3 /W:3 /IS
/IT /NP /NC /NS >>TodaysPages.log /NDL /NJH /NJS /R:3 /W:3
The log file results of this are:
16:12:59.39___2009_06_18
C:\TEMP\NATest1.pdf
C:\TEMP\NATest2.pdf
C:\TEMP\NATest3.pdf
"Pegasus [MVP]" wrote:
"JMic" <JMic@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E49B0812-0324-44D9-B761-F47A2359D904@xxxxxxxxxxxxxxxx
I am working with Robocopy to copy and move multiple files to multiple
directories. All is working well except for the logging. I am able to
get
the
log to output the source info but cannot get it to output the
destination
directory without adding the job summary. I do not want to include the
job
summary as this provides to much information for my logging
requirements.
I
don't want to move away from Robocopy just because of this one missing
piece
but simpler apps like XCopy have this ability. I have tried the /fp
switch
but this still does not list the destination directory.
The destination directory is shown right up the top. It is the same for
each
and every file:
Source : h:\
Dest : d:\HulDisk\
If you want to show it for every copied file then you could write a
simple
little script that changes this log file line:
New Dir 8 h:\WINDOWS\system32\oobe\regerror\
into this one:
New Dir 8 h:\WINDOWS\system32\oobe\regerror\
d:\HulDisk\WINDOWS\system32\oobe\regerror\
.
- Follow-Ups:
- References:
- Robocopy - not providing destination in log output
- From: JMic
- Re: Robocopy - not providing destination in log output
- From: Pegasus [MVP]
- Re: Robocopy - not providing destination in log output
- From: JMic
- Robocopy - not providing destination in log output
- Prev by Date: Re: Execute a batch file on remote host
- Next by Date: Re: Robocopy - not providing destination in log output
- Previous by thread: Re: Robocopy - not providing destination in log output
- Next by thread: Re: Robocopy - not providing destination in log output
- Index(es):
Relevant Pages
|