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

Home » Public Forums » archive » Re: filename keyword
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: filename keyword [message #40711] Tue, 31 August 2004 16:58
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"Adhara" <adharac@hotmail.com> wrote in message news:4cbae60f.0408311513.2f9a1a68@posting.google.com...
> Hello,
> I would like to know how to select all the files within my current
> folder that are named differently as:
> 1_10top.out
> 50_10top.out
> 100_10top.out
> 200_10top..............1000_10top.out

Try something like:
print, file_search('*_10top.out')

Cheers,
bob
Re: filename keyword [message #40712 is a reply to message #40711] Tue, 31 August 2004 16:19 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
adharac@hotmail.com (Adhara) writes:
> Hello,
> I would like to know how to select all the files within my current
> folder that are named differently as:
> 1_10top.out
> 50_10top.out
> 100_10top.out
> 200_10top..............1000_10top.out
>
>
> I think it should be something like this, but how can I fill out the
> '???' part?
>
> FOR k=0,11 DO BEGIN
> filename = '??????'+'_10top'+'.out'

You can use STRTRIM(I,2) to convert an integer I into a string with no
surrounding spaces. That should fill in your '????' nicely.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: filename keyword
Next Topic: IDL and FFTW 3

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

Current Time: Thu Oct 09 21:27:15 PDT 2025

Total time taken to generate the page: 1.52191 seconds