GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Windows Server 2003
- >
- Re: Robocopy create 2 logs
Windows Server 2003
1845515
Members
3096
Online
110244
Solutions
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
Forums
Categories
This widget could not be displayed.
Company
This widget could not be displayed.
Local Language
This widget could not be displayed.
back
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
back
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
Blogs
Information
This widget could not be displayed.
This widget could not be displayed.
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- This widget could not be displayed.This widget could not be displayed.This widget could not be displayed.This widget could not be displayed.This widget could not be displayed.This widget could not be displayed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2009 04:02 PM
08-11-2009 04:02 PM
Robocopy create 2 logs
Hi,
I want to create two log files for each job executed in a Robocopy batchfile each night of the week. One will be appended with each nights progress output using the /LOG+: switch and thus continually grow a full history of backup copies. The other will also produce a log with the same activity but will erase the previous nights content of the file using the /LOG: switch.
So my command line entry looks like this:
Robocopy %SOURCE1%\ %DEST1% /NP /IF *-cd* *-cw* *-cm* *.spf* /MAXAGE:2 /S /ZB /LOG+:spcopylog.txt /Log:2dayslog.txt
What I get using the syntax above is a fully appended log (which I want) but the second log just has the path to itself as the content.
I want to use vmail to email me the 2dayslog content which it does but as stated the log itself is devoid of the actual work done by Robocopy.
Thanks in advance...
Roger
I want to create two log files for each job executed in a Robocopy batchfile each night of the week. One will be appended with each nights progress output using the /LOG+: switch and thus continually grow a full history of backup copies. The other will also produce a log with the same activity but will erase the previous nights content of the file using the /LOG: switch.
So my command line entry looks like this:
Robocopy %SOURCE1%\ %DEST1% /NP /IF *-cd* *-cw* *-cm* *.spf* /MAXAGE:2 /S /ZB /LOG+:spcopylog.txt /Log:2dayslog.txt
What I get using the syntax above is a fully appended log (which I want) but the second log just has the path to itself as the content.
I want to use vmail to email me the 2dayslog content which it does but as stated the log itself is devoid of the actual work done by Robocopy.
Thanks in advance...
Roger
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2009 02:14 PM
08-13-2009 02:14 PM
Re: Robocopy create 2 logs
I think that you can only do one log file.
But, try adding in the /TEE switch. You "may" be able to then redirect to an additional output file.
Robocopy %SOURCE1%\ %DEST1% /NP /IF *-cd* *-cw* *-cm* *.spf* /MAXAGE:2 /S /ZB /LOG+:spcopylog.txt /TEE >2dayslog.txt
Jon
But, try adding in the /TEE switch. You "may" be able to then redirect to an additional output file.
Robocopy %SOURCE1%\ %DEST1% /NP /IF *-cd* *-cw* *-cm* *.spf* /MAXAGE:2 /S /ZB /LOG+:spcopylog.txt /TEE >2dayslog.txt
Jon
"Do or do not. There is no try!" - Yoda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2009 03:14 PM
08-13-2009 03:14 PM
Re: Robocopy create 2 logs
Thanks. I found an alternate way...
Robocopy %SOURCE1%\ %DEST1% /NP /IF *-cd* *-cw* *-cm* *.spf* /MAXAGE:2 /S /ZB /LOG:2daylog.txt
Robocopy %SOURCE2%\ %DEST2% /NP /IF *-cd* *-cw* *-cm* *.spf* /MAXAGE:2 /S /ZB /LOG+:2daylog.txt
Then...
:: Prepare logs for emailing
::
Echo Today's backup report: > spinctail.txt
::
:: Add the content for the email header i.e. to, from subject, beginning message to the out going message
::
Type Header.txt >> spinctail.txt
::
:: Add the contents of today's backup log to the email message
::
Type 2daylog.txt >> spinctail.txt
::
:: Use vmail to send the prepared email. Format must include Executable - Filename - mail server - recipient email - sender email
::
VMAILER.EXE spinctail.txt myserver.mydomainname.co.nz itadministrators@mydomainname.co.nz SPBackup@mydomainname.co.nz
::
:: Append the master log (spcopylog.txt) with today's backup log
::
TYPE 2daylog.txt >> spcopylog.txt
...so the master log being spcopylog.txt is appended each day from the 2daylog.txt capture. Works great too...
Thanks for responding.
Robocopy %SOURCE1%\ %DEST1% /NP /IF *-cd* *-cw* *-cm* *.spf* /MAXAGE:2 /S /ZB /LOG:2daylog.txt
Robocopy %SOURCE2%\ %DEST2% /NP /IF *-cd* *-cw* *-cm* *.spf* /MAXAGE:2 /S /ZB /LOG+:2daylog.txt
Then...
:: Prepare logs for emailing
::
Echo Today's backup report: > spinctail.txt
::
:: Add the content for the email header i.e. to, from subject, beginning message to the out going message
::
Type Header.txt >> spinctail.txt
::
:: Add the contents of today's backup log to the email message
::
Type 2daylog.txt >> spinctail.txt
::
:: Use vmail to send the prepared email. Format must include Executable - Filename - mail server - recipient email - sender email
::
VMAILER.EXE spinctail.txt myserver.mydomainname.co.nz itadministrators@mydomainname.co.nz SPBackup@mydomainname.co.nz
::
:: Append the master log (spcopylog.txt) with today's backup log
::
TYPE 2daylog.txt >> spcopylog.txt
...so the master log being spcopylog.txt is appended each day from the 2daylog.txt capture. Works great too...
Thanks for responding.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2009 11:47 PM
08-26-2009 11:47 PM
Re: Robocopy create 2 logs
Hi,
Just so you know.
Chances are you can't do 2 different logs with Robocopy by itself.
I know you're using Robocopy command line tool, but look at the Robocopy GUI 3.1.
There's only 1 field for log path, regardless of whether you use /LOG: or /LOG+:
Regards.
Just so you know.
Chances are you can't do 2 different logs with Robocopy by itself.
I know you're using Robocopy command line tool, but look at the Robocopy GUI 3.1.
There's only 1 field for log path, regardless of whether you use /LOG: or /LOG+:
Regards.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP