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

Home » Public Forums » archive » Re: open files in some 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: open files in some directory [message #32953 is a reply to message #32950] Mon, 18 November 2002 19:41 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
tom (tom2959@21cn.com) writes:

> Hi, I'd like to open one file in a directory. For example,
> openr,1,'d:\data\1.txt'
> but next time maybe open 2.txt in that directory. I donot want to change the
> code every time. Are there any method when the program excute at openr, a
> window containing the files can jump out and then I can chose files in the
> directory to be opened? Somebody told me Matlab code:
> [fname,fpath]=uigetfile('*.*','Data'), but I donot use Matlab.

How about something like this:

filename = Dialog_Pickfile(Filter='*.txt', Path='D:\Data\')
IF filename EQ "" THEN RETURN
OpenR, lun, filename, /Get_Lun

You shouldn't have to learn MatLab just to read the
name of your data file into your program. :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Previous Topic: Re: CAT, DOG, 1.7 AND FISH IN IDL
Next Topic: FONT setting

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

Current Time: Sat Oct 11 22:26:05 PDT 2025

Total time taken to generate the page: 2.48063 seconds