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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pre/Post options

Status
Not open for further replies.

weescotty

IS-IT--Management
Oct 30, 2002
61
AU
OK.
I have a batch file that runs on completion of the job and sends an email out to me and the boss.

Is it possible to include a variable in the command line that I can pass to the file, or will Arcserve dump it.

i.e.
Currently - jobcomp.bat
Would like - jobcomp.bat monday (etc)

That way I can use the 'day' variable to set things in the batch file.

Thanks

Using Arcserve 2000, SP5.
 
Ooops should add -

entry in the post option currently -
c:\asscripts\jobcomp.bat

want to use -
c:\asscripts\jobcomp.bat monday

Then in the batch file going to use -
set backday=%1 (ie the variable passed with the command)

Just unsure if arcserve will allow
c:\asscripts\jobcomp.bat monday
 
It *should* work just fine, since you are passing the variable in the same shell as the command - if you want to use a system set variable, however, then you'll need to do just that - set it as a system and not a user variable.

You could test out your theory by running the batch file with a small mod of :

echo %1
pause

after your set, and it would wait until you pressed a key to continue, allowing you to see if the variable you are wanting to pass is in fact stored as you think it is. I always used to use lots of echo's and pauses when debugging batch files in pre/post this way.
 
Thanks

I know it works outside of Arcserve so guess I'll just give it a go see what happens.

Going to use two variables that will set two values in the batchfile -

c:\asscripts\jobcomp.bat monday,2 (as in day and week number).

Think the only thing I might have to do is enclose it all in quotes in the post option box.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top