Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: DOS question

RE: DOS question

From: Branimir Petrovic <BranimirP_at_cpas.com>
Date: Thu, 2 Dec 2004 08:36:16 -0500
Message-ID: <33678E78A2DD4D418396703A750048D401025103@RIKER>


While quite an accomplishment considering DOS batch shortcomings, env. variables %date% and %time% are unknowns on NT 4, therefore the trick can not be successfully applied in WinNT4-Win2K3 range.

After let's say "interesting" day yesterday at customer's site and the way some environment variables are/aren't available with scheduled scripts on NT4, I am more convinced than ever that any reliance on Windows DOS batch-ing and/or native (*.wsf, *.vbs, *.js) scripting should be avoided like a plague...

Branimir

> -----Original Message-----
> From: Alexander.Feinstein_at_mitchell1.com
>
>
> Here is another alternate that works:
>
> for /F "tokens=3D1-4 delims=3D/ " %%o in ("%DATE%") do (
> set MM=3D%%p
> set DD=3D%%q
> set YY=3D%%r
> )
> for /F "tokens=3D1-5 delims=3D.:" %%s in ("%TIME%") do (
> set HH=3D%%s
> set MI=3D%%t
> set SS=3D%%u
> )
> set CURR_DATE=3D%YY%%MM%%DD%%HH%%MI%%SS%
> set CURR_DATE=3D%CURR_DATE: =3D0%
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Dec 02 2004 - 07:33:39 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US