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

Home -> Community -> Usenet -> c.d.o.server -> timestamp question

timestamp question

From: Joe <joe_at_notrealmail.com>
Date: Thu, 17 Oct 2002 09:06:45 -0700
Message-ID: <3daec300$1_9@news.newsgroups.com>


I inherted a problem at work that involves running two Windows NT2000 batch files everyday to assign a timestamp to log file. I don't no how this got messed up, but I changed OS fron NT4 to NT2000 and I'm new to 2000 batch timestamp commands. I don't see where the NT2000 batch gets the file to rename, the result it just has D:\oracle\admin\PDS\exp\pdsexp%TODAY%_%HH%_%MN%.LOG . Is this how windows NT 2000 timestamp works. I know something is wrong because the file is renamed with an underscore not the date.

I export a file to a directory with this batch; exp dba_opr/exp_backup full=y rows=n
file=d:\oracle\admin\PDS\exp\pdsexp_test.DMP LOG=d:\oracle\admin\PDS\exp\pdsexp_test.LOG

Then I run this batch to rename the file with a timestamp; set time_stamp=.
set today=%yy%%mm%%dd%

FOR /F "tokens=1-3 delims= " %%A in ("%date%_%time%") do set time_stamp=%%B%%C
FOR /F "tokens=1-3 delims=/" %%A in ("%time_stamp%") do set time_stamp=%%A%%B%%C
FOR /F "tokens=1-3 delims=:" %%A in ("%time_stamp%") do set time_stamp=%%A%%B%%C
FOR /F "tokens=1-2 delims=." %%A in ("%time_stamp%") do set time_stamp=%%A%%B
D:\oracle\admin\PDS\exp\pdsexp%TODAY%_%HH%_%MN%.LOG

-----------== 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 17 2002 - 11:06:45 CDT

Original text of this message

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