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

Home » Public Forums » archive » Setting a variable to the name of the folder it is in two steps up..
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: Setting a variable to the name of the folder it is in two steps up.. [message #92584 is a reply to message #92583] Mon, 18 January 2016 21:21 Go to previous message
Jim  Pendleton is currently offline  Jim Pendleton
Messages: 165
Registered: November 2011
Senior Member
On Monday, January 18, 2016 at 8:21:15 PM UTC-7, Jake Haslemann wrote:
> Hi everyone! First Post here, so we will see how it goes.. This may or may not be a very simple question to answer, but I was wondering if anyone knew a way to set a variable to the name of the folder it is in, but two steps up in the directories.. For example, if my path reads:
> jake/L100/hbetacodetemp/p45
> and my idl code is located in p45...
> I want to set a variable to the value "L100" or whatever that folder will be.
>
> In other words I want to set the variable:
> identifier = L100
> but without typing that out explicitly, such that the code will be able to gather that for me

Take a look at the docs for the functions ROUTINE_FILEPATH and STRSPLIT, for example, http://www.exelisvis.com/docs/routine_filepath.html.

Jim P.
[Message index]
 
Read Message
Read Message
Previous Topic: i cann't open idl because idlde.exe has stopped working.
Next Topic: "error initializing graphics device window" in the new Python bridge

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

Current Time: Sun Oct 12 03:49:14 PDT 2025

Total time taken to generate the page: 0.63974 seconds