Need Help to write a script that copy files

Hi, i need help to write batch file script that copy files from 20 different computer to Log server.
i want to copy all my files form \\computer1\Log\ , \Computer2\Log\, Computer3\Log\ ...
to central location \\LogServer\Logs\ .
I want that this script will run / scheduled every day, 1st time that this script run it will copy all files from computer to LogServer & in another day's it will copy just new files [something like incremental backup].
please HELP
BZNUSERAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LeeeRussellCommented:
What operating system to you run on the Log server?
fgrehlCommented:
You can do this easy with robocopy.
http://technet.microsoft.com/en-us/library/cc733145(WS.10).aspx

robocopy \\computer1\Log\ \\logserver\logs\computer1
BZNUSERAuthor Commented:
I use Microsoft Windows XP on all computers,
how can i use robocopy & if exist ?
can some one write an example >?
Get Blueprints for Increased Customer Retention

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

petertimmermansCommented:
the coment from fqrehl says it all. There nothing more to it than just that.
LeeeRussellCommented:
Well, there is a bit more to it than that.  Robocopy can be used, but is not installed by default on Windows xp, so you'll have to download that first:

http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en

Then you can write a batch file that uses robocopy for all the servers you wanted:


robocopy \\computer1\Log\ \\logserver\logs\computer1
robocopy \\computer2\Log\ \\logserver\logs\computer2
etc...

and then when you've written the batch file you can call it from Windows task scheduler to run every day.
fgrehlCommented:
You do not need "if exist". It uses incremental copy automatically.
BZNUSERAuthor Commented:
Hi,
10xs to all - i succeed write my 1st robocopy batch file,
I am using /Log:logfile.txt switch,
and my question is :
How can i send the log's by e-mail?
i want to receive log files of robocopy by e-mail?
or better option is get just logs with errors?
please assist
LeeeRussellCommented:
You can use a command line email client to send the logs by email from within your batch file.  I've use sendmail successfully in the past (http://www.sendmail.org/) but others have recommended blat (http://www.blat.net/).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.