title: How to download multiple files in multiple sub-directories using curl?
body: <p>I am downloading multiple files using curl. The base URL for all the files is the same like</p>
  <p><a href="https://mydata.gov/daily/2017" rel="nofollow noreferrer">https://mydata.gov/daily/2017</a></p>
  <p>The data in these directories are further grouped by date and file type. So the first data that I need has this directory</p>
  <p><a href="https://mydata.gov/daily/2017/001/17d/Roger001.gz" rel="nofollow noreferrer">https://mydata.gov/daily/2017/001/17d/Roger001.gz</a></p>
  <p>The second data being</p>
  <p><a href="https://mydata.gov/daily/2017/002/17d/Roger002.gz" rel="nofollow noreferrer">https://mydata.gov/daily/2017/002/17d/Roger002.gz</a></p>
  <p>I need to download up until the data for the last day of 2017 which is</p>
  <p><a href="https://mydata.gov/daily/2017/365/17d/Roger365.gz" rel="nofollow noreferrer">https://mydata.gov/daily/2017/365/17d/Roger365.gz</a></p>
  <p>How can I use curl or any other similar tool to download all the files to a single local folder, preferably adopting the original file names?</p>