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:01:26 -0700
Message-ID: <3DA4A736.8020706@uclink.berkeley.edu>


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
  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

>
>
> "Karsten Farell" <kfarrell_at_medimpact.com> wrote in message
> news:_41p9.1754$7S6.134136000_at_newssvr21.news.prodigy.com...
>

>>Phil Robyn wrote:
>>
>>>Well, the name (setdate) is the same but the functionality is different.
>>>The programs at the two sites you mentioned are for setting/changing
>>>the date and time information for files.  This has nothing to do with
>>>the OP's situation at all. :-)
>>>
>>
>>Oops! I knew I shouldn't try to read German. :)
>>
>>How about this site then: http://www.fpschultze.de/bsh.htm
>>
>>Search the page for DATENAME.BAT (about 2/3 of the way down the
>>document). It renames a filename to the current date (author claims it
>>works in all MS O/S). Maybe Joe can get some hints on how to do what he
>>wants.
>>

>
>
>
>
>
> -----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
> http://www.newsfeed.com The #1 Newsgroup Service in the World!
> -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----
-- 
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:01:26 CDT

Original text of this message

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