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

Home » Public Forums » archive » Re: findfile not recognized
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: findfile not recognized [message #44798] Wed, 20 July 2005 12:47 Go to next message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
What do you ger when you type

result = findfile('c:\path\to\images\*.jpg')

You may want to replace *.jpg with the true extension of you images?


<amohraz@gmail.com> wrote in message
news:1121882624.312760.62700@g14g2000cwa.googlegroups.com...
> Thanks a lot for your response, Haje. findfile just doesn't find
> anything, and I have tried specifying the full path. It doesn't work!
> Thanks for your suggestion on file_search. The problem is I'm using a
> lot of routines that were written by other people and frequently use
> findfile in them, so I would have to modify a lot of files if I were to
> change all of them to file_search.
> Do you have any ideas as to how to fix this?
> Many thanks again,
> Ali
>
Re: findfile not recognized [message #44802 is a reply to message #44798] Wed, 20 July 2005 11:03 Go to previous messageGo to next message
amohraz is currently offline  amohraz
Messages: 6
Registered: July 2005
Junior Member
Thanks a lot for your response, Haje. findfile just doesn't find
anything, and I have tried specifying the full path. It doesn't work!
Thanks for your suggestion on file_search. The problem is I'm using a
lot of routines that were written by other people and frequently use
findfile in them, so I would have to modify a lot of files if I were to
change all of them to file_search.
Do you have any ideas as to how to fix this?
Many thanks again,
Ali
Re: findfile not recognized [message #44803 is a reply to message #44802] Wed, 20 July 2005 10:30 Go to previous messageGo to next message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
What is the problem your are having? Is it that findfile does not work at
all or that findfile does not find your image files? This is an important
difference and not quite clear from your message. If the latter is the case,
have you tried specifying the full path in the search command?

Haje

BTW: findfile is pretty much obsolete. The replacement, file_search, is much
better.


<amohraz@gmail.com> wrote in message
news:1121878356.720999.55460@g49g2000cwa.googlegroups.com...
>
> I am using IDL version 5.6 for some image processing and particle
> dynamics. We've been using a bunch of algorithms routinely and all of a
> sudden our software has decided to not recognize the command findfile.
> I am trying to read images from the same folder that I'm in, and this
> has worked a million times before but all of a sudden won't work
> anymore and just won't see the files. Does anyone know what's going on
> and how I can fix this?
>
Re: findfile not recognized [message #44924 is a reply to message #44802] Thu, 21 July 2005 07:37 Go to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
<amohraz@gmail.com> wrote in message
news:1121882624.312760.62700@g14g2000cwa.googlegroups.com...
> Thanks a lot for your response, Haje. findfile just doesn't find
> anything, and I have tried specifying the full path. It doesn't work!
> Thanks for your suggestion on file_search. The problem is I'm using a
> lot of routines that were written by other people and frequently use
> findfile in them, so I would have to modify a lot of files if I were to
> change all of them to file_search.
> Do you have any ideas as to how to fix this?
> Many thanks again,
> Ali

A couple of suggestions:
your filename is almost certainly to blame.

0) use file_search. Seriously.

1) To be certain you have the correct path, try to read the tif file
filename = '/group2/Ali2/071805/6535j2/6535j20001.tif'

f=findfile(filename,count=nf)
help,f
Result = READ_TIFF( Filename)
help, result
f_search=file_search(filename)
help,f_search

2) are the files ending in tiff rather than tif?

3) is it a network drive and the access is too slow (so the command times
out?)

4) so if you can get the much better file_search() routine to work, perhaps
you could
overwrite the findfile routine (i don't remember ver 5.6, is findfile a
*.pro routine?)
Anyways, if you could write a findfile routine that just called file_search,
that may solve
the problem. Disclaimer, this would be a pretty bad hack, completely
non-portable,
and certain to cause great error and confusion in the future. Only soulless
demons
like myself would even consider the idea. You'd be much better off changing
every
call to findfile in all your source code.

5) do you have a HUGE number of files? That could be a problem. I ran into
a
real damaging bug reading satellite data files, because my findfile routines
would
return something like 98% of the files that actually existed, causing my
robust code
to handle the "missing data" when it was in fact not missing.
In one case, I had to actually cd to the path, and get the current listing
cd,cur=cur
cd,subdirectory
files = findfile('*.'+filetype,count=num)
cd,cur
That was an operating system problem, that went away with the next upgrade
(sorry I don't remember what version, it was a redhat linux of a couple
years ago).


Cheers,
bob
Re: findfile not recognized [message #44945 is a reply to message #44798] Wed, 20 July 2005 14:17 Go to previous message
amohraz is currently offline  amohraz
Messages: 6
Registered: July 2005
Junior Member
When I type this command and hit return, it doesn't give me any
messages at all. I then typed the following:
result = findfile('c:\path\to\images\*.*', count=nf)
and then
print, nf
it prints 0.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL Documentation tool?
Next Topic: IDL Documentation tool

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

Current Time: Wed Oct 08 07:58:39 PDT 2025

Total time taken to generate the page: 0.00416 seconds