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

Home » Public Forums » archive » Re: calling another directory within program
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: calling another directory within program [message #47231] Sun, 29 January 2006 10:28
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
pimpk24@hotmail.com writes:

> btw, do you offer any student discounts on your book?

Always. All you have to do is ask in the Comment
section of the order form. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: calling another directory within program [message #47232 is a reply to message #47231] Sun, 29 January 2006 10:14 Go to previous message
pimpk24 is currently offline  pimpk24
Messages: 7
Registered: January 2006
Junior Member
thanks david
btw, do you offer any student discounts on your book?
Re: calling another directory within program [message #47233 is a reply to message #47232] Sun, 29 January 2006 10:14 Go to previous message
pimpk24 is currently offline  pimpk24
Messages: 7
Registered: January 2006
Junior Member
thanks david
Re: calling another directory within program [message #47234 is a reply to message #47233] Sun, 29 January 2006 09:18 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
pimpk24@hotmail.com writes:

> Iam an IDL newbie and have a question that I believe is pretty
> straighforward for most of you:
>
> I am writing a program that has various subroutines that are withing my
> working directory. However, in the beginning of the program I want to
> be able to call and restore a '.sav' file that is in another
> subdirectory than my current working one. Basically, I have a 'data
> directory' and 'idl programs directory' and need to be able to access
> both of them within the program that Iam writing.
>
> I have tried the !PATH function but I am still getting a 'file cannot
> be found error'- perhaps I am not using the proper syntax though?

No, !PATH is not what you want. You want to be able to
specify a file name inside your program. To do that in
a way that is portable across computer architectures
(you THINK you will be the only one who uses this program,
but you might be surprised at how famous you become
in IDL programming circles!) use the FILEPATH function
to construct the file name.

Check the IDL documentation for CD while you are looking
up FILEPATH, too. If you are interested in locating your
"data" directory with respect to your "programs" directory,
check out ProgramRootDir:

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

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: calling another directory within program
Next Topic: Re: Fastest Nearest Neighbor Calculation

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

Current Time: Fri Oct 10 15:51:38 PDT 2025

Total time taken to generate the page: 0.55944 seconds