Advertisement

04.04.2008 at 08:27AM PDT, ID: 23296341
[x]
Attachment Details

Batch file script email log file help...

Asked by Nicola_Bourne in Windows Batch Scripting

Tags: Batch Scripting

Hi all,

Need a little help with a simple little batch file script.

I currently backup some data using a small Windows Batch script (code attached) to an external USB hard disk.

The script currently copies everything in is residing directory (*.*) using XCopy to two locations (as you can see in the code). What I want to achieve is to log all the data it does actually copy to a separate logfile (DAY/MONTH/YEAR.log?) and then use my external SMTP server to email that file to a given address.

I don't know how to A: log the output and B: have it email the logfile (my SMTP email server also needs a username password to allow connections)

Any help appreciated,

Thanks.

Start Free Trial
1:
2:
3:
@ECHO OFF
XCOPY *.* \\server1\c$\backup /D /S /E /Y /Z
XCOPY *.* l:\backup /D /S /E /Y /Z
[+][-]04.04.2008 at 09:00AM PDT, ID: 21283068

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.04.2008 at 12:08PM PDT, ID: 21284744

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.06.2008 at 12:50PM PDT, ID: 21292927

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.06.2008 at 02:40PM PDT, ID: 21293236

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Windows Batch Scripting
Tags: Batch Scripting
Sign Up Now!
Solution Provided By: dragon-it
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628