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

Home » Public Forums » archive » Re: duplicate .pro filenames
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
Re: duplicate .pro filenames [message #32142] Mon, 16 September 2002 11:03
air_jlin is currently offline  air_jlin
Messages: 22
Registered: July 2001
Junior Member
hi Reimar,

thanks much for the help!

best,
-Johnny
Re: duplicate .pro filenames [message #32144 is a reply to message #32142] Sun, 15 September 2002 03:14 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Dear Johnny

If you are interested where are the routines which are duplicated
you can add following lines

ix=which_indices(fpe.name,result)
print,fpe[ix].path+' -> '+fpe[ix].name


http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/which_indices.tar.gz

or as idl5.5 binary

http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/which_indices.sav



Reimar

--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
Re: duplicate .pro filenames [message #32145 is a reply to message #32144] Sun, 15 September 2002 03:05 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Johnny Lin wrote:

> hi all,
>
> i was trying to find a routine that would tell me whether or not there
> were any duplicate *.pro files defined among the directories in my
> !PATH, and since i couldn't find one (though i found routines that were
> similar in function) i thought i'd just write one. if you're interested
> it's at:
>
> http://www.johnny-lin.com/idl_code/duplicate_pro.pro
>
> unfortunately it's only been tested on unix and doesn't look into the
> files to find hidden utility routines (nor can it search for idl built-in
> routines...if someone knows how to program that in, would be much obliged
> for any help you could give) but just thought i'd mention it in case it's
> of use to anyone.
>
> best,
> -Johnny

Dear Johnny

here is my solution it should run on each platform.
I am sorry it looks very short because we do prefer many small
functions which could be used later on different projects too.
The names are always choosen (hopefully) what's they are doing or
what`s the result is.


pro dupl

f=file_search(expand_path(!path,/ARRAY),'*.pro')
fpe=file_path_name_ext(f)
result=arr_equal(fpe.name,/sort)
print,result

end


The routines file_path_name_ext and arr_equal are from our library.
I believe both are for others useful too.
file_search is a replacement for findfile. You can found the help text by
Bens help tool or in the whats new description. expand_path is the idl
routine which expands pathes.

http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/file_path_name_ext.tar.gz
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/arr_equal.tar.gz

or as idl5.5 binary

http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/file_path_name_ext.sav
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/arr_equal.sav



For further routines and licensing please have a loot at.
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html

best regards

Reimar

--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: readcol procedure
Next Topic: Scrolling in draw widgets - newbie's question

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

Current Time: Wed Oct 08 11:32:30 PDT 2025

Total time taken to generate the page: 0.00539 seconds