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: Joe Caporina <spam_at_nospam.com>
Date: Thu, 10 Oct 2002 09:00:54 -0700
Message-ID: <3da58737_3@news.newsgroups.com>


The batch file is looping as it was before the change;

S:\script>for /F "tokens=5-6 delims=.: " %a in ('echo.|time|find "urrent"') do s
et HR=%a & set MIN=%b

S:\script>set HR=8 & set MIN=44

S:\script>call exp1.bat

S:\script>exp dba_opr/exp_backup full=y
file=d:\oracle\admin\PDS\exp\pdsexp%b_8_ 44.DMP LOG=d:\oracle\admin\PDS\exp\pdsexp%b_8_44.LOG

S:\script>cd/d d:\oracle\admin\PDS\script The device is not ready.

S:\script>for /F "tokens=2" %a in ('date /t') do set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>for /F "tokens=5-6 delims=.: " %a in ('echo.|time|find "urrent"') do s
et HR=%a & set MIN=%b

S:\script>set HR=8 & set MIN=44

S:\script>call exp1.bat

S:\script>exp dba_opr/exp_backup full=y
file=d:\oracle\admin\PDS\exp\pdsexp%b_8_ 44.DMP LOG=d:\oracle\admin\PDS\exp\pdsexp%b_8_44.LOG

S:\script>cd/d d:\oracle\admin\PDS\script The device is not ready.

S:\script>for /F "tokens=2" %a in ('date /t') do set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>for /F "tokens=5-6 delims=.: " %a in ('echo.|time|find "urrent"') do s
et HR=%a & set MIN=%b

S:\script>set HR=8 & set MIN=44

S:\script>call exp1.bat

S:\script>exp dba_opr/exp_backup full=y
file=d:\oracle\admin\PDS\exp\pdsexp%b_8_ 44.DMP LOG=d:\oracle\admin\PDS\exp\pdsexp%b_8_44.LOG

S:\script>cd/d d:\oracle\admin\PDS\script The device is not ready.

S:\script>for /F "tokens=2" %a in ('date /t') do set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>for /F "tokens=5-6 delims=.: " %a in ('echo.|time|find "urrent"') do s
et HR=%a & set MIN=%b

S:\script>set HR=8 & set MIN=44

S:\script>call exp1.bat

S:\script>exp dba_opr/exp_backup full=y
file=d:\oracle\admin\PDS\exp\pdsexp%b_8_ 44.DMP LOG=d:\oracle\admin\PDS\exp\pdsexp%b_8_44.LOG

S:\script>cd/d d:\oracle\admin\PDS\script The device is not ready.

S:\script>for /F "tokens=2" %a in ('date /t') do set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>for /F "tokens=5-6 delims=.: " %a in ('echo.|time|find "urrent"') do s
et HR=%a & set MIN=%b

S:\script>set HR=8 & set MIN=44

S:\script>call exp1.bat

S:\script>exp dba_opr/exp_backup full=y
file=d:\oracle\admin\PDS\exp\pdsexp%b_8_ 44.DMP LOG=d:\oracle\admin\PDS\exp\pdsexp%b_8_44.LOG

S:\script>cd/d d:\oracle\admin\PDS\script The device is not ready.

S:\script>for /F "tokens=2" %a in ('date /t') do set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>for /F "tokens=5-6 delims=.: " %a in ('echo.|time|find "urrent"') do s
et HR=%a & set MIN=%b

S:\script>set HR=8 & set MIN=44

S:\script>call exp1.bat

S:\script>exp dba_opr/exp_backup full=y
file=d:\oracle\admin\PDS\exp\pdsexp%b_8_ 44.DMP LOG=d:\oracle\admin\PDS\exp\pdsexp%b_8_44.LOG

S:\script>cd/d d:\oracle\admin\PDS\script The device is not ready.

S:\script>for /F "tokens=2" %a in ('date /t') do set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>for /F "tokens=5-6 delims=.: " %a in ('echo.|time|find "urrent"') do s
et HR=%a & set MIN=%b

S:\script>set HR=8 & set MIN=44

S:\script>call exp1.bat

S:\script>exp dba_opr/exp_backup full=y
file=d:\oracle\admin\PDS\exp\pdsexp%b_8_ 44.DMP LOG=d:\oracle\admin\PDS\exp\pdsexp%b_8_44.LOG

S:\script>cd/d d:\oracle\admin\PDS\script The device is not ready.

S:\script>for /F "tokens=2" %a in ('date /t') do set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>for /F "tokens=5-6 delims=.: " %a in ('echo.|time|find "urrent"') do s
et HR=%a & set MIN=%b

S:\script>set HR=8 & set MIN=44

S:\script>call exp1.bat

S:\script>exp dba_opr/exp_backup full=y
file=d:\oracle\admin\PDS\exp\pdsexp%b_8_ 44.DMP LOG=d:\oracle\admin\PDS\exp\pdsexp%b_8_44.LOG

S:\script>cd/d d:\oracle\admin\PDS\script The device is not ready.

S:\script>for /F "tokens=2" %a in ('date /t') do set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>for /F "tokens=5-6 delims=.: " %a in ('echo.|time|find "urrent"') do s
et HR=%a & set MIN=%b

S:\script>set HR=8 & set MIN=44

S:\script>call exp1.bat

S:\script>exp dba_opr/exp_backup full=y
file=d:\oracle\admin\PDS\exp\pdsexp%b_8_ 44.DMP LOG=d:\oracle\admin\PDS\exp\pdsexp%b_8_44.LOG

S:\script>cd/d d:\oracle\admin\PDS\script The device is not ready.

S:\script>for /F "tokens=2" %a in ('date /t') do set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>for /F "tokens=5-6 delims=.: " %a in ('echo.|time|find "urrent"') do s
et HR=%a & set MIN=%b

S:\script>set HR=8 & set MIN=44

S:\script>call exp1.bat

S:\script>exp dba_opr/exp_backup full=y
file=d:\oracle\admin\PDS\exp\pdsexp%b_8_ 44.DMP LOG=d:\oracle\admin\PDS\exp\pdsexp%b_8_44.LOG

S:\script>cd/d d:\oracle\admin\PDS\script The device is not ready.

S:\script>for /F "tokens=2" %a in ('date /t') do set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>for /F "tokens=5-6 delims=.: " %a in ('echo.|time|find "urrent"') do s
et HR=%a & set MIN=%b

S:\script>set HR=8 & set MIN=44

S:\script>call exp1.bat

S:\script>exp dba_opr/exp_backup full=y
file=d:\oracle\admin\PDS\exp\pdsexp%b_8_ 44.DMP LOG=d:\oracle\admin\PDS\exp\pdsexp%b_8_44.LOG

S:\script>cd/d d:\oracle\admin\PDS\script The device is not ready.

S:\script>for /F "tokens=2" %a in ('date /t') do set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>for /F "tokens=5-6 delims=.: " %a in ('echo.|time|find "urrent"') do s
et HR=%a & set MIN=%b

S:\script>set HR=8 & set MIN=44

S:\script>call exp1.bat

S:\script>exp dba_opr/exp_backup full=y
file=d:\oracle\admin\PDS\exp\pdsexp%b_8_ 44.DMP LOG=d:\oracle\admin\PDS\exp\pdsexp%b_8_44.LOG

S:\script>cd/d d:\oracle\admin\PDS\script The device is not ready.

S:\script>for /F "tokens=2" %a in ('date /t') do set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>for /F "tokens=5-6 delims=.: " %a in ('echo.|time|find "urrent"') do s
et HR=%a & set MIN=%b

S:\script>set HR=8 & set MIN=44

S:\script>call exp1.bat

S:\script>exp dba_opr/exp_backup full=y
file=d:\oracle\admin\PDS\exp\pdsexp%b_8_ 44.DMP LOG=d:\oracle\admin\PDS\exp\pdsexp%b_8_44.LOG

S:\script>cd/d d:\oracle\admin\PDS\script The device is not ready.

S:\script>for /F "tokens=2" %a in ('date /t') do set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>for /F "tokens=5-6 delims=.: " %a in ('echo.|time|find "urrent"') do s
et HR=%a & set MIN=%b

S:\script>set HR=8 & set MIN=44

S:\script>call exp1.bat

S:\script>exp dba_opr/exp_backup full=y
file=d:\oracle\admin\PDS\exp\pdsexp%b_8_ 44.DMP LOG=d:\oracle\admin\PDS\exp\pdsexp%b_8_44.LOG

S:\script>cd/d d:\oracle\admin\PDS\script The device is not ready.

S:\script>for /F "tokens=2" %a in ('date /t') do set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>set TODAY=%b

S:\script>for /F "tokens=5-6 delims=.: " %a in ('echo.|time|find "urrent"') do s
et HR=%a & set MIN=%b
^CTerminate batch job (Y/N)? y
Contents of exp.bat before change:

cd/d d:\oracle\admin\PDS\script

setdate >setenv.bat

call setenv.bat

call exp1.bat

sendmail -t esdbsecurityadministrationgroup_at_equiva.com -f parapp06 -s "PARAPP06 CHECK - PDS" -b
\\parapp06.pap.starent.com\d$\oracle\admin\PDS\exp\pdsexp%TODAY%_%HR%_%MIN%. LOG Contents of exp.bat after change:

cd/d d:\oracle\admin\PDS\script

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

call exp1.bat
sendmail -t esdbsecurityadministrationgroup_at_equiva.com -f parapp06 -s "PARAPP06 CHECK - PDS" -b
\\parapp06.pap.starent.com\d$\oracle\admin\PDS\exp\pdsexp%TODAY%_%HR%_%MIN%. LOG contents of exp1.bat:

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

"Phil Robyn" <zipprobyn_at_uclink.berkeley.edu> wrote in message news:3DA4A736.8020706_at_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 ....
>

-----------== 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 =----- Received on Thu Oct 10 2002 - 11:00:54 CDT

Original text of this message

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