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

Home » Public Forums » archive » Re: IDL command for directory files listing
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: IDL command for directory files listing [message #48760] Thu, 18 May 2006 15:01
Jeff N. is currently offline  Jeff N.
Messages: 120
Registered: April 2005
Senior Member
Here's what I usually use, it seems to work pretty well for me:
http://www.ittvis.com/codebank/search.asp?FID=237

It prints out the equivalent to the UNIX command 'ls -la'

Jeff

Fritz wrote:
> Hello,
>
> What is the IDL command for listing the files in one directory ?
> The equivalent of the DOS DIR command...
>
> Thank you,
>
> Francois.
Re: IDL command for directory files listing [message #48763 is a reply to message #48760] Thu, 18 May 2006 11:18 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dick Jackson writes:

> You can get an array of strings and print them as follows:
> Print, File_Search() ; Files, directories, etc.
> Print, File_Search(/Test_Regular) ; Files only
> Print, File_Search(/Test_Directory) ; Directories only

By the way, I still like XCD for this purpose on Windows
machines:

http://www.dfanning.com/programs/xcd.zip

It's too bad we don't have a machine-portable solution.
Maybe the new RSI (ITTVIS) would be amenable to offering
a free T-Shirt to someone who solved this particular
problem.

In fact, a Best IDL Utility programing contest, with T-shirts
to the top 10 winners might even solve a clear marketing
problem and get the word out about the name change.
I'll suggest it to them. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: IDL command for directory files listing [message #48766 is a reply to message #48763] Thu, 18 May 2006 11:09 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dick Jackson writes:

> You can get an array of strings and print them as follows:
> Print, File_Search() ; Files, directories, etc.
> Print, File_Search(/Test_Regular) ; Files only
> Print, File_Search(/Test_Directory) ; Directories only

Sigh... If we just had some JAVA code to format it nicely!

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: IDL command for directory files listing [message #48767 is a reply to message #48766] Thu, 18 May 2006 11:00 Go to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
Hi Fritz/Francois,

"Fritz" <f.leduc@hotmail.com> wrote in message
news:1147973868.400618@pwww.drenet.dnd.ca...
> Hello,
>
> What is the IDL command for listing the files in one directory ?
> The equivalent of the DOS DIR command...

You can get an array of strings and print them as follows:
Print, File_Search() ; Files, directories, etc.
Print, File_Search(/Test_Regular) ; Files only
Print, File_Search(/Test_Directory) ; Directories only

> Thank you,
>
> Francois.

--
Cheers,
--
-Dick

Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Victoria, BC, Canada / +1-250-220-6117 / Fax: 391-6114
Re: IDL command for directory files listing [message #48768 is a reply to message #48767] Thu, 18 May 2006 10:59 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Fritz writes:

> What is the IDL command for listing the files in one directory ?
> The equivalent of the DOS DIR command...

IDL command!? You are thinking IDL 8.0. We are trying
to figure out how to fix all the IDL deficiencies with JAVA
code in the current version. :-)

Cheers,

David

P.S. You might try this if you are on a UNIX machine:

IDL> $ls

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Image division causes Floating illegal operand
Next Topic: DESCRIPTION field missing from read_tiff()

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

Current Time: Sun Oct 12 04:57:35 PDT 2025

Total time taken to generate the page: 0.72280 seconds