 <p>Something like this should give u all the filenames in the folder, for you to manipulate:</p> <pre><code>Dir["Tel/**/**/*.csv].each do |file| * update attribute of your model with the path of the file end </code></pre>