Hi, in CMD you can play with redirecting of DATE output into temporary file and SETtting a variable using input piped from this temp file.
Much simpler solution is to purchase 4NT (www.jpsoft.com) which is very simillar to CMD but includes much more additional functionality. Using it, the solution could look very simillar like you wrote it: > D: > :SETVAR > Cd D:\Program Files\tivoli\tsm\baclient\ > dsmc Archive -archmc=36-MONTH-ARCHIVE -desc="Freight Archives > for Monthend > Prior to: %_date" D:\temp\test\* > pause 5 or e.G. like that: rem remember current working directory and change to new Directory and Disk rem start the archive rem pause if unsuccessfull rem wait for 5 seconds rem change back to original working directory PUSHD D:\Program Files\tivoli\tsm\baclient\ DSMC Archive -archmc=36-MONTH-ARCHIVE -desc="Freight Archives for Monthend Prior to: %_date %_time" D:\temp\test\* -subdir=yes IF %? GT 0 PAUSE an error occured during Archive. Press Enter to continue. DELAY 5 POPD Regards juraj > -----Original Message----- > From: Rob Hefty [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 31, 2002 10:15 PM > To: [EMAIL PROTECTED] > Subject: Help on a TSM bat file for NT > > > Hello All, > > I am attempting to create a bat file that will automate an > archive for some > data on the NT/Win2k platform. What I am having difficulty > with is passing > the date variable into the description. So far I have: > > D: > :SETVAR > set date/t=dates > Cd D:\Program Files\tivoli\tsm\baclient\ > dsmc Archive -archmc=36-MONTH-ARCHIVE -desc="Freight Archives > for Monthend > Prior to: %dates%" D:\temp\test\* > pause 5 > > When it completes it runs the archive fine only the > description is lacking a > date stamp. Any suggestions would be appreciated. > > > Thanks, > Rob Hefty > IS Operations > Lab Safety Supply >
