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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Is NT 2000 Dos Batch Timestamp sysntax different ?

Re: Is NT 2000 Dos Batch Timestamp sysntax different ?

From: Phil Robyn <zipprobyn_at_uclink.berkeley.edu>
Date: Wed, 09 Oct 2002 15:04:14 -0700
Message-ID: <3DA4A7DE.9060700@uclink.berkeley.edu>


Phil Robyn wrote:
> Joe Caporina wrote:
>

>> I'll try the German setdate.com . I'll look into datetime.bat. I already
>> think there is a problem using datename. bat when  exporting files to be
>> renamed current date. Using setdate makes it easy.
>> exp dba_opr/exp_backup full=y
>> file=d:\oracle\admin\PDS\exp\pdsexp%TODAY%_%HR%_%MIN%.DMP
>> LOG=d:\oracle\admin\PDS\exp\pdsexp%TODAY%_%HR%_%MIN%.LOG
>> Thx Joe

>
>
> If all you need are TODAY, HR, and MIN, then just incorporate
> the following (without the line numbers) into your batch file:
>
> 1. for /f "tokens=2" %%a in (
> 2. 'date /t') do set TODAY=%%b

Typo alert: should be

   2. 'date /t') do set TODAY=%%a

> 3. set TODAY=%TODAY:/=%
> 4. set TODAY=%TODAY:~6,2%%TODAY:~0,4%
> 5. for /f "tokens=5-6 delims=.: " %%a in (
> 6. 'echo.^|time^|find "urrent"'
> 7. ) do set HR=%%a&set MIN=%%b
>

-- 
t o    s e n d    e - m a i l    u s e    ' R e p l y - T o '
o r    u n z i p    m y    ' F r o m '    a d d r e s s  ....
Received on Wed Oct 09 2002 - 17:04:14 CDT

Original text of this message

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