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

Home » Public Forums » archive » Re: Path/Directory String
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Path/Directory String [message #55050 is a reply to message #55049] Tue, 31 July 2007 05:47 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
payon@gmx.de writes:

> Ah all right thanks a lot, it works!
> And now i have the next small problem.

You may have more problems then you realize when
you put functions with CANCEL buttons inside of
other functions, but I guess you will discover that
soon enough. :-)

> Now i tried to read out all filenames which are included in the
> selected path
> with files=file_search(dialog_pickfile(/dir),'*.tif')
> I wanted to compare them with a defined string array, to know which
> files are missing, and so which computations cannot be proceed.
> the problem is, that in my defined array, i just have the filenames.
> Because the path is variable. But the result of
> files=file_search(dialog_pickfile(/dir),'*.tif') gives me the filename
> with the whole path. Is there any possibility to get just the
> filenames in a path, without any path link?

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ROI Scaling
Next Topic: Re: control widgets

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

Current Time: Wed Oct 08 19:26:29 PDT 2025

Total time taken to generate the page: 0.00214 seconds