Re: read_tiff only looks in current working directory? [message #56436] |
Wed, 31 October 2007 15:38  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
David Fanning wrote:
> Jeff N. writes:
>
>> A couple of times now i've run into a strange problem that i haven't
>> had time to pay much attention to until now. I'm simply trying to
>> read a tiff file with READ_TIFF, but this code fails:
>>
>> indir = 'g:\'
>> infile = 'test.tif'
>> inpath = indir + infile
>>
>> ;cd,indir
>>
>> indata=read_tiff(infile)
>> help, indata
>>
>> It fails with a file not found error even though I know that the file
>> is in the location i'm specifying. Also, the error message prints out
>> the full path to the file it's looking for, and it is looking for the
>> correct file name, but the directory path it's looking in is always
>> the current working directory. So, if i uncomment the call to the CD
>> command above, the file gets read with no problem. Has anyone else
>> come across this? This isn't the way it's supposed to work is it?
>
> Uh, maybe you want this command:
>
> indata = read_tiff(inpath)
>
> That might work better. :-)
I think I can hear Jeff's "d'oh!" way over here.... :o)
cheers,
paulv
|
|
|
Re: read_tiff only looks in current working directory? [message #56437 is a reply to message #56436] |
Wed, 31 October 2007 15:10   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jeff N. writes:
> A couple of times now i've run into a strange problem that i haven't
> had time to pay much attention to until now. I'm simply trying to
> read a tiff file with READ_TIFF, but this code fails:
>
> indir = 'g:\'
> infile = 'test.tif'
> inpath = indir + infile
>
> ;cd,indir
>
> indata=read_tiff(infile)
> help, indata
>
> It fails with a file not found error even though I know that the file
> is in the location i'm specifying. Also, the error message prints out
> the full path to the file it's looking for, and it is looking for the
> correct file name, but the directory path it's looking in is always
> the current working directory. So, if i uncomment the call to the CD
> command above, the file gets read with no problem. Has anyone else
> come across this? This isn't the way it's supposed to work is it?
Uh, maybe you want this command:
indata = read_tiff(inpath)
That might work better. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: read_tiff only looks in current working directory? [message #56438 is a reply to message #56437] |
Wed, 31 October 2007 15:05   |
Jeff N.
Messages: 120 Registered: April 2005
|
Senior Member |
|
|
On Oct 31, 6:01 pm, "Jeff N." <jnett...@utk.edu> wrote:
> Hi folks,
>
> A couple of times now i've run into a strange problem that i haven't
> had time to pay much attention to until now. I'm simply trying to
> read a tiff file with READ_TIFF, but this code fails:
>
> indir = 'g:\'
> infile = 'test.tif'
> inpath = indir + infile
>
> ;cd,indir
>
> indata=read_tiff(infile)
> help, indata
>
> It fails with a file not found error even though I know that the file
> is in the location i'm specifying. Also, the error message prints out
> the full path to the file it's looking for, and it is looking for the
> correct file name, but the directory path it's looking in is always
> the current working directory. So, if i uncomment the call to the CD
> command above, the file gets read with no problem. Has anyone else
> come across this? This isn't the way it's supposed to work is it?
>
> Jeff
BTW, I should add that I don't see this behavior with every tiff file
I try to read. It appears sporadically, and with tiff files created
by different means.
|
|
|
Re: read_tiff only looks in current working directory? [message #56627 is a reply to message #56438] |
Thu, 01 November 2007 09:03  |
Jeff N.
Messages: 120 Registered: April 2005
|
Senior Member |
|
|
On Oct 31, 6:05 pm, "Jeff N." <jnett...@utk.edu> wrote:
> On Oct 31, 6:01 pm, "Jeff N." <jnett...@utk.edu> wrote:
>
>
>
>> Hi folks,
>
>> A couple of times now i've run into a strange problem that i haven't
>> had time to pay much attention to until now. I'm simply trying to
>> read a tiff file with READ_TIFF, but this code fails:
>
>> indir = 'g:\'
>> infile = 'test.tif'
>> inpath = indir + infile
>
>> ;cd,indir
>
>> indata=read_tiff(infile)
>> help, indata
>
>> It fails with a file not found error even though I know that the file
>> is in the location i'm specifying. Also, the error message prints out
>> the full path to the file it's looking for, and it is looking for the
>> correct file name, but the directory path it's looking in is always
>> the current working directory. So, if i uncomment the call to the CD
>> command above, the file gets read with no problem. Has anyone else
>> come across this? This isn't the way it's supposed to work is it?
>
>> Jeff
>
> BTW, I should add that I don't see this behavior with every tiff file
> I try to read. It appears sporadically, and with tiff files created
> by different means.
UGHHH!!!! I wish you could erase posts sometimes!! :(
|
|
|