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

Home » Public Forums » archive » Re: How to run a program for datasets located in different folders at a single stretch
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 run a program for datasets located in different folders at a single stretch [message #71949 is a reply to message #71946] Wed, 28 July 2010 05:22 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
sid writes:

> I have a program which I need to run for several data sets (which
> are in different different folders), Since the number of folders in
> which the data sets present are huge in number, it is very difficult
> to go to that folder in which the dataset is and then copy the program
> to that particular folder and run it(orelse i need to copy the
> location of the dataset in the program, which is also a difficult
> task). So please give some ideas to run the program for all the
> datasets in different folder at a single stretch.

I have the problem of writing IDL programs that not only
run on the three different machines that I juggle on a
daily basis, but run on scientists and collaborators
machines, too. It is almost impossible to specify
a data file name that works everywhere.

Since the files I am looking for are often mixed in with
IDL programs somewhere on the end-users IDL path, I use
the Coyote Library routine FIND_RESOURCE_FILE to locate
them:

dataFile = Find_Resource_File('theFileForJob.dat')

It is kind of like IDL's search for *.pro files, only
for data files.

It can often be slow (if the user has a large IDL path),
but it almost always does the job!

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

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Using contour procedure to extract specific regions
Next Topic: Re: How to run a program for datasets located in different folders at a single stretch

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

Current Time: Sat Oct 11 07:13:11 PDT 2025

Total time taken to generate the page: 1.67760 seconds