General Question

Espin01's avatar

Working with files in Ruby...

Asked by Espin01 (32points) February 26th, 2008
2 responses
“Great Question” (1points)

Ok, I have ruby and I would like it to store the names of all of the jpeg files in the folder the program is located in and preform a certain action on each file. I am guessing I need to put all the names into an array, but that is about it.

Observing members: 0
Composing members: 0

Answers

paulc's avatar

Dir.glob and Dir.each will help you out. I suggest glob so you can just match to a pattern.

Espin01's avatar

Thanks!

Answer this question

Login

or

Join

to answer.

Mobile | Desktop


Send Feedback   

`