RE: DOS question

  • From: Branimir Petrovic <BranimirP@xxxxxxxx>
  • To: Oracle-L@xxxxxxxxxxxxx
  • Date: Thu, 2 Dec 2004 08:36:16 -0500

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@xxxxxxxxxxxxx
> 
> 
> 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%
> 
--
//www.freelists.org/webpage/oracle-l

Other related posts: