Re: Path/Directory String [message #55049 is a reply to message #55046] |
Tue, 31 July 2007 06:10   |
payon
Messages: 11 Registered: July 2007
|
Junior Member |
|
|
>
> You might try moving to the directory you selected (not
> possible with the way you are writing the code, but it
> shouldn't be written that way anyhow, so...) and *then*
> using FILE_SEARCH to look for the files. You can use the
> CD command to change directories.
>
> theDir = DIALOG_PICKFILE(/DIRECTORY)
> IF theDir EQ "" THEN RETURN
> CD, theDir, CURRENT=currentDir
> theFiles = FILE_SEARCH('*.tif')
> CD, currentDir
>
> 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.")
Wow, thanks a lot again! Very simple, but very clever. I didn't think
about to change the directory. But this is the simpliest way to get
just the filename! So i wish you to have a nice day and thanks again,
david!
By the way, i've bought your book IDL Programming Techniques, 2nd
Edition. It is really fantastic! I learned a lot, and it's also a big
help with widget programming. I still use it as my reference IDL book,
because you describe things on a very simple and unterstandable way!
It would be also very great, if you could also describe the
call_external routine as well as make_dll to implement some simple C
code in IDL. Maybe in the 3rd edition? :) Because I didn't find any
book where it was explained clearly. Of course, IDL doesn't need any C
functions. It's more powerful, but I had to control my Camera via a
frame grabber. And this was only possible with C.. Ok.. thanks and
bye ..
Martin
|
|
|