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

Home » Public Forums » archive » Re: file_search: need work around for filenames with square brackets [ ]
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: file_search: need work around for filenames with square brackets [ ] [message #66960 is a reply to message #66959] Mon, 15 June 2009 15:23 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
rklein writes:

> I'd rather go sailing, but could you come back from the tennis court
> please and have a look at this idl journal:
>
> ; IDL Version 7.0, Microsoft Windows (Win32 x86 m32)
> ; Journal File for Administrator@FIFILSTEST
> ; Working directory: C:\FIFILS\Software\FlightSoftware
> ; Date: Mon Jun 15 21:58:08 2009
>
> print,file_search("K:\OBSERVATIONS\archiveData
> \20090403_095540\00098_153217_spiral162_@0078*")
> ;K:\OBSERVATIONS\archiveData
> \20090403_095540\00098_153217_spiral162_@0078_[4,-4]_lw.dff
> ;K:\OBSERVATIONS\archiveData
> \20090403_095540\00098_153217_spiral162_@0078_[4,-4]_lw.fit
> ;K:\OBSERVATIONS\archiveData
> \20090403_095540\00098_153217_spiral162_@0078_[4,-4]_lw.rff
> print,file_search("K:\OBSERVATIONS\archiveData
> \20090403_095540\00098_153217_spiral162_@0078_\[4,-4\]_lw.df f ")
> print,file_search("K:\OBSERVATIONS\archiveData
> \20090403_095540\00098_153217_spiral162_@0078_/[4,-4/]_lw.df f ")
> print,file_search('"K:\OBSERVATIONS\archiveData
> \20090403_095540\00098_153217_spiral162_@0078_[4,-4]_lw.dff"')
>
> Of course, I tried escaping the brackets, but it does not work as you
> can see from the above. May be I should have mentioned that I am
> running on Windows

Well, I don't know. I'm running on Windows, too, and
I have absolutely no problems finding these files:

IDL> files = file_search("c:\temp", '00098_153217*', COUNT=count)
IDL> print, count
2
IDL> for j=0,1 do print, files[j]
C:\temp\00098_153217_spiral162_@0078_[4,-4]_lw.dff
C:\temp\00098_153217_spiral162_@0078_[4,-4]_lw.fit

This is Windows XP and IDL 7.0.4.

I think this might be a Windows problem, not IDL.

Cheers,

David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDLDOC 3.2 Index page not as interesting as it could be...
Next Topic: update variable in structure

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

Current Time: Sat Oct 11 13:21:36 PDT 2025

Total time taken to generate the page: 1.68126 seconds