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

Home » Public Forums » archive » filename check
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: filename [message #23644 is a reply to message #22084] Wed, 07 February 2001 09:20 Go to previous messageGo to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
I face this all the time, and must confess in being too lazy to write a
solution. I usually search for a delimiter from the string end
(Strpos(path, delimiter, /reverse)) or use Get_Path keyword, Strlen the
path and Strmid the returned value from that location to the end:

full_loc = Dialog_pickfile(get_path=path)
length = strlen(path)
file_name = strmid(full_loc, length)

Three lines of code; oh well. Need a wrapper function to make it one
line :-)

Cheers,
Pavel

Gernot Reishofer wrote:
>
> hi,
>
> I have to save two files with the same filename but different
> extensions. Using DIALOG_PICKFILE creates path+filename+extention.
> Can you experts tell me the shortest way to get the filename avoiding
> too many string operations?
>
> thanks for help
>
> Gernot
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: ENVI slope function
Next Topic: Re: HELP: How to read 10-bit image file

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

Current Time: Fri Oct 10 20:01:55 PDT 2025

Total time taken to generate the page: 0.80258 seconds