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

Home » Public Forums » archive » Filtering File Names with Dialog_Pickfile
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: Filtering File Names with Dialog_Pickfile [message #60907 is a reply to message #60671] Thu, 12 June 2008 08:53 Go to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
Spon wrote:
> Hi,
>
> our archive has a large folder that holds all our data folders (this
> is a requirement of our data acquisition software). These folders tend
> to have names that start with a researcher's initials, e.g.
> 'RB1006_17.Xz0'.
>
> Is there any clever way to get Dialog_Pickfile to display only certain
> folders as defined by a regexp? Unfortunately very little can be
> gleaned from the extension, which the acquisition software allocates
> by some mystic method, and cannot be changed unless I never want that
> software to recognise the data folder ever again (I _DON'T_ want to do
> this...)
>
> I've been playing around with the FILE and FILTER keywords, but they
> only seem to control file extensions, and are unable to filter by
> searching the file name.
>
> What I'm looking for is something like this:
>
> CD, ArchiveDir
> Dir = Dialog_Pickfile(/Read, /Must_Exist, /Dir, Filter = 'RB*.*')
>
> That would show only those sub-folders within ArchiveDir that have
> 'RB' in their name. But it doesn't work. Neither with nor without /
> Directory set.
> I'd rather not have to write my own pickfile widget if there's a
> clever way of using the inbuilt one :-)
>
> Thanks,
> Chris

Hi Chris,

I doubt you can filter the folder names... it would be easy to get stuck
in the wrong folder and have nothing to display in the dialog box...
which is unwanted by most users.

An easy trick would be to have a routine that creates in a different
folder a file (not a folder, whatever extension) of the same name as
your sub-folders. Then you can filter the name of these files. Once
selected, remove the extension you have added, get the name of the
folder and save it..

Jean
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: ROI stack
Next Topic: IDL programming solutions competition?

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

Current Time: Fri Oct 10 06:56:30 PDT 2025

Total time taken to generate the page: 1.59930 seconds