> I am trying to "Read Content" of all the files from a Directory. So far
> I can "Open" all files but this just shows the "names of all files" in
> the directory and not the "file content".
> My Program code is
> arr= Dir.open("K:/test").entries
> arr.each { |i| puts i }
>
> I can open and read the content of an individual file using "File.open"
> command but I don't know how to read the content of all the files in a
> particular Directory.
>

Hi,

You've got a good start there.  As you have already figured out, the
arr.each iterator there gives you the name of each file.  So, what you
would want to do to read the content of each file, is inside the each
iterator do a File.open(i), then do whatever you need with the
contents of the file.

arr = Dir.ope("K:/test").entires
arr.each do |file|
  File.open(file) do |fd|
    # do whatever you need with the file
  end
end


-Jonathan Nielsen