comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: extracting all but...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: extracting all but... [message #46303 is a reply to message #46300] Sat, 19 November 2005 08:29 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Reimar Bauer writes:

> idl has in idl6.0 introduced two routines FILE_BASENAME and FILE_DIRNAME.
> There is no builtin routine to separate the extension - unfortunately.

Well, I'll offer up FSC_BASE_FILENAME, which can give you the
directory, the filename, and the extension all in one go:

; EXAMPLE:
;
; IDL> thePath = "C:\rsi\idl7.8\lib\jester.pro"
; IDL> Print, FSC_Base_Filename(thePath, Directory=dir,Extension=ext)
; jester
; IDL> Print, dir
; C:\rsi\idl7.8\lib\
; IDL> Print, ext
; pro

You can find it here:

http://www.dfanning.com/programs/fsc_base_filename.pro

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Version control for IDL software
Next Topic: Re: extracting strings between ' '

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 22:11:35 PDT 2025

Total time taken to generate the page: 0.87816 seconds