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: PL/SQL equivalent of unix basename command

RE: PL/SQL equivalent of unix basename command

From: Ian Cary (C) <Ian.Cary_at_ordnancesurvey.co.uk>
Date: Wed, 31 Aug 2005 13:24:00 +0100
Message-ID: <4AA808D68343824E8891632BD448AE6B1BEB4A@OSMAIL.ordsvy.gov.uk>


Assuming you have the directory in a variable dirname say;

substr(dirname,instr(dirname,'\',-1)+1)

would do the trick.

You could also you regexp if you are on version 10.

Cheers,

Ian

-----Original Message-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of John Dunn Sent: 31 August 2005 13:15
To: 'oracle-l digest users'
Subject: PL/SQL equivalent of unix basename command

Does PL/SQL have an equivalent of the unix basename command, which returns just the filename part of a full file path?

e.g for C:\dir\file.txt

would return

file.txt

??

--

http://www.freelists.org/webpage/oracle-l

This email and any attachments have been virus checked upon receipt at Ordnance Survey and are free of all known viruses.

This email is only intended for the person to whom it is addressed and may contain confidential information. If you have received this email in error, please notify the sender and delete this email which must not be copied, distributed or disclosed to any other person. Unless stated otherwise, the contents of this email are personal to the writer and do not represent the official view of Ordnance Survey. Nor can any contract be formed on Ordnance Survey's behalf via email. We reserve the right to monitor emails and attachments without prior notice.

Thank you for your cooperation.

Ordnance Survey
Romsey Road
Southampton SO16 4GU
Tel: 023 8079 2000
http://www.ordnancesurvey.co.uk

--

http://www.freelists.org/webpage/oracle-l Received on Wed Aug 31 2005 - 07:26:03 CDT

Original text of this message

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