|
Re: How to run a program for datasets located in different folders at a single stretch [message #71939 is a reply to message #71930] |
Wed, 28 July 2010 07:03  |
sid
Messages: 50 Registered: January 1995
|
Member |
|
|
On Jul 28, 6:31 pm, David Fanning <n...@dfanning.com> wrote:
> Kenneth P. Bowman writes:
>> I think that in general 'data' files should not be in the IDL search
>> path and that this problem is best solved primarily (but not entirely)
>> outside of IDL.
>
> Well, I was describing the actual situation, not the
> theoretical best practice. :-)
>
> Cheers,
>
> David
>
Hi,
I am getting this kind of error after running the program. I have
copied the required routines to my idl routines directory.
Could you please explain why it happens
regards
sid
% Compiled module: FIND_RESOURCE_FILE.
% Compiled module: FILEPATH.
IF ( StrPos(thisRoutine.Path, Path_Sep()) ) EQ -1 THEN BEGIN
^
% Syntax error.
At: /home/sid/Downloads/idl_routines/programrootdir.pro, Line 154
ENDIF ELSE BEGIN
^
% Type of end does not match statement (END expected).
At: /home/sid/Downloads/idl_routines/programrootdir.pro, Line 157
% Compiled module: PROGRAMROOTDIR.
% Compiled module: ERROR_MESSAGE.
% Compiled module: STRSPLIT.
Traceback Report from FIND_RESOURCE_FILE:
% Attempt to call undefined procedure/function: 'PROGRAMROOTDIR'.
% Execution halted at: FIND_RESOURCE_FILE 129 /home/sid/
Downloads/idl_routines/find_resource_file.pro
% $MAIN$
|
|
|
Re: How to run a program for datasets located in different folders at a single stretch [message #71953 is a reply to message #71939] |
Wed, 28 July 2010 02:46  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On Jul 28, 3:29 am, sid <gunvicsi...@gmail.com> wrote:
> Hi,
> 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.
> regards
I suggest that you investigate using the IDL "path." IDL searches the
path for program files no matter where your data is located. See the
IDL documentation for "!PATH"
As for automating processing with "huge" numbers of folders, your best
bet is probably to investigate using the "CD" procedure. This
procedure allows your program to change working folders under program
control, so that you can switch from one folder to the next in
succession, without quitting your program.
Craig
|
|
|