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

Home » Public Forums » archive » Re: How to set the default working directory?
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: How to set the default working directory? [message #66030 is a reply to message #66028] Tue, 14 April 2009 05:43 Go to previous messageGo to previous message
David Gell is currently offline  David Gell
Messages: 29
Registered: January 2009
Junior Member
On Apr 14, 12:08 am, rainingpe...@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.
>
> Sincerely,
> Li, Tongmu

The !path and path preference are only used in finding the files
containing IDL functions and procedures. It doesn't have any effect on
searches for other types of files. You can use the CD procedure to set
the current working directory. A more general solution, that limits
typing, is to use the DIALOG_PICKFILE function to display a file
chooser. You can use this function to select a file, then save the
directory path for the default in future calls.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: getting derivatives from spline
Next Topic: Re: no focus on a widget

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

Current Time: Thu Oct 09 05:29:41 PDT 2025

Total time taken to generate the page: 6.24138 seconds