Title: ratbo's Replies | WordPress.org

---

# ratbo

  [  ](https://wordpress.org/support/users/ratbo/)

 *   [Profile](https://wordpress.org/support/users/ratbo/)
 *   [Topics Started](https://wordpress.org/support/users/ratbo/topics/)
 *   [Replies Created](https://wordpress.org/support/users/ratbo/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/ratbo/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/ratbo/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/ratbo/engagements/)
 *   [Favorites](https://wordpress.org/support/users/ratbo/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[m1.DownloadList] Select last File from Folder](https://wordpress.org/support/topic/select-last-file-from-folder/)
 *  Thread Starter [ratbo](https://wordpress.org/support/users/ratbo/)
 * (@ratbo)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/select-last-file-from-folder/#post-14298235)
 * Thanks. I managed to change it myself.
 * i added `if(!array_key_exists('latest', $atts)) $atts['latest'] = "";` to get
   a latest attribute and between the foreach a `if ($atts['latest'] == "1") {break;}`
 * now, when i use latest=1 as attribute and the sort order i can output the first,
   or the last file in the directory (our files has a date as filename)
 * works great and thank you for the great plugin

Viewing 1 replies (of 1 total)