Here is a batch file from an intersting little batch programming help site I found: http://www.ericphelps.com/batch/nt/index.htm
:: Here's NT code that puts something like :: 03/17/2002 :: into the DATE environment variable @echo off echo.|date|find "current" >t#e.bat echo set date=%%5> the.bat call t#e.bat del t?e.bat > nul :: Thanks to Joseph P. Hayes :: [EMAIL PROTECTED] :: Here's a one-line NT command (but a LONG line!) :: one that splits all the date parts out, putting :: each one into it's own variable (weekday, date, month, year) for /f "tokens=1-4 delims=/ " %%a in ('date /t') do (set weekday=%%a& set date=%%b& set month=%%c& set year=%%d) Rob Hefty <[EMAIL PROTECTED]> on 07/31/2002 01:15:19 PM Please respond to "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] cc: (bcc: Joseph Pendergast/Corona/Watson) 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