- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Windows Server 2003
- >
- Robocopy create 2 logs
Windows Server 2003
1821985
Members
3433
Online
109638
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
- 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
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP