I want to get all file names from a folder using Ruby.
Personally, I found this the most useful for looping over files in a folder, forward looking safety:
Dir['/etc/path/*'].each do |file_name| next if File.directory? file_name end