Re: filename keyword [message #40711] |
Tue, 31 August 2004 16:58 |
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  |
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
------------------------------------------------------------ --------------
|
|
|