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

Home » Public Forums » archive » How to set the default working directory?
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
How to set the default working directory? [message #66038] Mon, 13 April 2009 22:08 Go to next message
rainingpeace is currently offline  rainingpeace
Messages: 1
Registered: April 2009
Junior Member
Hi all,

I am trying to use IDL to read and write CDF files. Now I am suffering
a problem. I am trying to set my default working directory to "D:
\IDLWorkspace\". And I set "Reference->IDL->Path" and add the "D:
\IDLWorkspace" to the list and move it to the top. But it does not
work.
The reason why I want to set this directory is that otherwise every
time I am trying to read a file, I have to write the full path. By
setting a default working directory, I can just use
id=cdf_open('ge_edb3sec_mgf_20000125_v01.cdf')
instead of
id=cdf_open('C:\ge_edb3sec_mgf_20000125_v01.cdf'). I believe such a
small aim is achievable in such a powerful software like IDL. It is
just that I do not know how to do that.
This is just a simple example. My directory is much longer.
So as mentioned, I failed at setting the working directory. I hope
some one could help me.
Thanks in advance.

Sincerely,
Li, Tongmu
Re: How to set the default working directory? [message #66160 is a reply to message #66038] Wed, 15 April 2009 09:38 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
<rainingpeace@gmail.com> wrote:
> Hi all,
>
> I am trying to use IDL to read and write CDF files. Now I am suffering
> a problem. I am trying to set my default working directory to "D:
> \IDLWorkspace\". And I set "Reference->IDL->Path" and add the "D:
> \IDLWorkspace" to the list and move it to the top. But it does not
> work.
> The reason why I want to set this directory is that otherwise every
> time I am trying to read a file, I have to write the full path. By
> setting a default working directory, I can just use
> id=cdf_open('ge_edb3sec_mgf_20000125_v01.cdf')
> instead of
> id=cdf_open('C:\ge_edb3sec_mgf_20000125_v01.cdf'). I believe such a
> small aim is achievable in such a powerful software like IDL. It is
> just that I do not know how to do that.
> This is just a simple example. My directory is much longer.
> So as mentioned, I failed at setting the working directory. I hope
> some one could help me.
> Thanks in advance.

Check out FILE_WHICH. By default, it will check for files in !path.

Mike
--
www.michaelgalloy.com
Associate Research Scientist
Tech-X Corporation
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Italic and upright in the same title/caption
Next Topic: bug or feature?

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

Current Time: Wed Oct 08 17:46:48 PDT 2025

Total time taken to generate the page: 0.00591 seconds