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

Home » Public Forums » archive » putting file names into lists
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
putting file names into lists [message #84757] Fri, 07 June 2013 11:56 Go to next message
quincyaflint is currently offline  quincyaflint
Messages: 6
Registered: June 2013
Junior Member
I am trying to take the names of some FITS files from inside a folder and put them into a list (or array) that I can loop through. Is there any easy way to do this?
Re: putting file names into lists [message #84765 is a reply to message #84757] Fri, 07 June 2013 14:21 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 6/7/13 12:56 PM, qMD wrote:
>
> I am trying to take the names of some FITS files from inside a folder
> and put them into a list (or array) that I can loop through. Is there
> any easy way to do this?
>

files = file_search('*.fits', count=nfiles)
for i = 0L , nfiles - 1L do print, files[i]

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Subscript by -1 HARD to Track Down
Next Topic: IDL save result of procedure to file

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

Current Time: Wed Oct 08 14:00:27 PDT 2025

Total time taken to generate the page: 0.00656 seconds