...

View Full Version : Help regarding day date



Eelm
01-14-2005, 09:15 AM
Hi all,
I have been looking around on this great forums where i have found loads of interesting things that i will certainly use later ;) but unfortunatelly i haven t found what i am looking for.
I have modified my backup jobs as we just moved our servers to 2K3 and i have to managed a sldt tape magazine. I have done 7 batch files for my backups as each day they is different jobs to run on different tapes. but i would like (don t know if it s possible) one batch that would be like if day is .... than run job 1 else if day is .... than run ......... and so and so and so. And that s where my problem is :confused:

Don t know if anyone can help but i ll really appreciate :D

++

obiwanjabroni
01-15-2005, 09:08 PM
This is possible using the MS-DOS batch file format. The syntax, in your case, is simply:

if [condition] [command]

if your backup process is multiline, then you simply enclose the commands with perens, ie:

if [condition] (
[command1]
[command2]
.
.
.
)

All that's left for you to figure out is how to check the system time for the particular day!

http://www.microsoft.com/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/Default.asp?url=/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/batch.asp

^--- That's a good place to start.

Eelm
01-26-2005, 07:35 AM
Thank you for your answer Obiwanjabroni. Usefull link ;) Been away a few days, took some days off but manage to make it work :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum