I'd like to be able to list files from a distant directory on the network with Rails (for instance, listing every pictures in a folder to move them and do some processing on them).
So I tried to first list them by doing :
<% @files = Dir.glob("\\my\directory\on\the network\*" ) %>
<% @files.each do |file| %>
<%= file %>
<% end %>
Try it like this:
<%- @files = Dir.entries("//my/directory/on/the/network") %> <%- @files.each do |file| %> <%= file %> <% end %>