Hi,
I need to open every file in the folder matching the same pattern…
basically,
open every file matching “report” in folder
Thanks!
Hi,
I need to open every file in the folder matching the same pattern…
basically,
open every file matching “report” in folder
Thanks!
**and I need to return the filename to a variable ‘filename’
Try Dir.glob(pattern), as it returns an array with all of the files.
files = Dir.glob(“report”)
Hope that helps,
Michael G.
http://www.styledbits.com
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs