Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Running every file
Justin To
7/3/2008 11:37:00 PM
Hi,
I need to open every file in the folder matching the same pattern...
basically,
open every file matching "report" in folder
Thanks!
--
Posted via
http://www.ruby-...
.
2 Answers
Justin To
7/3/2008 11:41:00 PM
0
**and I need to return the filename to a variable 'filename'
--
Posted via
http://www.ruby-...
.
Michael Gorsuch
7/3/2008 11:59:00 PM
0
Try Dir.glob(pattern), as it returns an array with all of the files.
files = Dir.glob("*report*")
Hope that helps,
Michael Gorsuch
http://www.styl...
On Thu, Jul 3, 2008 at 7:41 PM, Justin To <tekmc@hotmail.com> wrote:
> **and I need to return the filename to a variable 'filename'
> --
> Posted via
http://www.ruby-...
.
>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Running every file
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password