# Creating A link for downloading files listed in directory

**URL:** <https://www.ruby-forum.com/t/creating-a-link-for-downloading-files-listed-in-directory/112427>\
**Category:** Rails\
**Created:** [August 18, 2007, 7:35pm UTC](https://www.ruby-forum.com/t/creating-a-link-for-downloading-files-listed-in-directory/112427 "2007-08-18T19:35:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![advait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@advait](https://www.ruby-forum.com/u/advait)\
**Post date:** [August 18, 2007, 7:35pm UTC](https://www.ruby-forum.com/t/creating-a-link-for-downloading-files-listed-in-directory/112427/1 "2007-08-18T19:35:09Z")

</div>

HI,

We know that when we list a directory structure, all the details that is  
subdirectories and files are shown.  
When I click on the sub directory it links to the next dub directory and  
works fine.  
My problem arises with the files listed, when I click on the link to  
files I should download that file which I have clicked on

Please tell me how would I accomplish this .

Thank you
