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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: how to generate unique file names on Windows.

RE: how to generate unique file names on Windows.

From: Bob Metelsky <bmetelsky_at_cps92.com>
Date: Tue, 30 Sep 2003 06:39:28 -0800
Message-ID: <F001.005D183C.20030930063928@fatcity.com>


This adds the time in fractions...

## uniquefile.bat##############################
@echo off
for /f "tokens=2,3,4 delims=/ " %%a in ('date /t') do set pre=%%a%%b%%c_

FOR /F "TOKENS=5-8 DELIMS=:. " %%F IN ('ECHO.^|TIME') DO (

SET Hour=%%F
SET Mins=%%G
SET Secs=%%H
SET Mill=%%I)

set filename=yourPREFIX_%pre: =_%%Hour: =_%%Mins: =_%%Secs: =_%%Mill:=_%.txt
##############################################

hth
bob

I am trying to write a script on windows that would export the db every night. Can someone tell me how to generate unique file names on windows...

What I am looking for is the windows equivalent of echo `date +%m%d%y`

Thanks in advance.

Murali.

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author:
  INET: Murali_Pavuloori/Claritas_at_claritas.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Bob Metelsky
  INET: bmetelsky_at_cps92.com
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Sep 30 2003 - 09:39:28 CDT

Original text of this message

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