Re: DOS question

  • From: "Yechiel Adar" <adar76@xxxxxxxxxxxx>
  • To: <Oracle-L@xxxxxxxxxxxxx>
  • Date: Mon, 6 Dec 2004 20:01:34 +0200

I just did: ECHO %DATE% and ECHO %TIME% on win2000 and win2003 and got the
correct date and time.
Do HELP SET in a dos box and you will see in the end that if Command
Extention are enabled %date% and %time% works.

Yechiel Adar
Mehish Computer Services
----- Original Message -----
From: "Branimir Petrovic" <BranimirP@xxxxxxxx>
To: <Oracle-L@xxxxxxxxxxxxx>
Sent: Thursday, December 02, 2004 3:36 PM
Subject: RE: DOS question


> 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

--
//www.freelists.org/webpage/oracle-l

Other related posts: