Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help making a batch file

Status
Not open for further replies.

cornbread333

IS-IT--Management
Oct 1, 2003
2
0
0
JP
Hello all,
Well I didn’t know if to ask this question here or on the programming forum but either way please bare with me on this especially considering the fact that I am new to the field... Well my question is concerned with a basic batch file, I want to be able to write one to automatically make a back up on the server once a month, but I have failed in my attempts and the only bit of guidance that I do have is "Windows NT shell scripting" book which has proven to be nothing but confusing for me... I would appreciate any assistance that anyone might be able to give in this matter. Also I am sorry if i have provided to little information in the matter it would probably be due to the fact that i dont know what needs to be given.

Collins
 
Write your full backup command in a batch file (a file with extension BAT or CMD). So this may be just a file with ONE single line in it !
Says the batch file is named c:\user\mybackup.bat
Now schedule it to run with the AT command
Note that if your backup command needs to run 'under' a specific user identification, you will need to change the schedule service settings
 
well thx for the assistance Letay it was somewhat useful... well I have created a batch file that will run that backup on the server but my only problem now is trying to use the "AT" command to have the batch file run at a specific time and date... I have tried to fine references to the command other than the at/? in command prompt and have not found anything promising... as of now I have the command set up as...

At %computername% time (whatever time I choose i.e. 20:00:00.00) /interactive
/every:date mon 10/27/2003 /next:date 10/28/2003 test.bat

and im trying to get it to run a test batch file on the desktop for now before trying to add the command to any other batch file... now I guess what im asking here is for assistance with the command because I am at a loss and if anyone which any experience in the matter could possibly tell me what I am doing wrong I would greatly appreciate it… oh and sorry if the “command” path is wrong I do not know if I need to specify if more…
 
The AT command can be confusing for inexperienced uses. A tool which is easier to use is the GUI based Scheduled Tasks utility that comes with newer versions of IE.

On a Win2K machine you will find it in Control Panel. It will allow you to schedule just about anything on a daily, weekly or monthly basis as well as on startup, log on or one time only. It also allows you to specify what account your batch file should run under.

To troubleshoot it, you can view the log in the Advanced menu.

However, once you get your backup job scheduled, you should play with the AT command and learn how it works.
 
OOPS.

I forgot which forum I was looking at. On an NT4 box, Scheduled Tasks appears under My Computer when you open Windows Explorer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top