Batch file help

Posted on 2009-04-01
Last Modified: 2012-05-06
I use a batch file to do data backups in my office. Can I also have the batch file create a log file
with time and date info of when it was last executed? Please give example and/or link so i can figure this out.
Thank you.
Question by:stevedantonio
  • 2

Accepted Solution

qualchoice-it earned 500 total points
ID: 24045626
Yep you sure can here is a snippet of a batch file that I use in my office to backup local PST files to a NAS device

@echo on
date /t > \\"servername"\Storage1\pst_backup\%computername%\pst_backup.log
time /t >> \\"servername"\Storage1\pst_backup\%computername%\pst_backup.log
echo close outlook if open >> \\lit-qca-back-01\Storage1\pst_backup\%computername%\pst_backup.log
taskkill /im outlook.exe

Author Closing Comment

ID: 31565602
Perfect, thank you.

Expert Comment

ID: 24045686
No problem  :)

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now