Title: Folder path
Last modified: May 7, 2018

---

# Folder path

 *  [virgikins](https://wordpress.org/support/users/virgikins/)
 * (@virgikins)
 * [8 years ago](https://wordpress.org/support/topic/folder-path-3/)
 * Hi, In january I put the plugin and it was working fine,
    This is the shortcode
   I used to display pdf
 * [MMFileList folder=”/documentation/” format=”li (unordered list)”]
 * But it seems that the folder updates every month and I’m stuck with this error
   message:
    The folder “/home/mysite/domains/mysite.fi/public_html/wp-content/uploads/
   2018/05/documentation” was not found at: “[http://www.mysite.fi/wp-content/uploads/2018/05/documentation&#8221](http://www.mysite.fi/wp-content/uploads/2018/05/documentation&#8221);.
 * I have tried to detail the path even more /wp-content/uploads/2018/01/documentation
   but it still give the same error structure:
    was not found at: “[http://www.mysite.fi/wp-content/uploads/2018/05/wp-content/uploads/2018/01/documentation&#8221](http://www.mysite.fi/wp-content/uploads/2018/05/wp-content/uploads/2018/01/documentation&#8221);.
 * So of course it wasn’t found, it doesn’t exist that one, but I can’t get rid 
   of the 05 for this monththat is added automatically.
 * Thanks for your help,

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [canonite](https://wordpress.org/support/users/canonite/)
 * (@canonite)
 * [8 years ago](https://wordpress.org/support/topic/folder-path-3/#post-10311543)
 * the code utilizes wp_upload_dir() (which is called in line 52: $baseDir = wp_upload_dir();)
   which changes with the year/month, _unless you uncheck the uploads\_use\_yearmonth\
   _folders setting in the administration panel (which I read on [dev.wp](https://developer.wordpress.org/reference/functions/wp_upload_dir/),
   but have no idea if its true or not)_
 * while i have only just installed this plug in today, i faced the same issue as
   you as i wanted to read from a folder (memos; which in itself contains subfolders
   divided into years) in wp-content/uploads, and not in the year/month folders.
 * be warned.. do this at your own risk..
    comment out line 53/54
 *     ```
       //$dir = $baseDir['path'] . '/' . $folder;
       //$outputDir = $baseDir['url'] . '/' . $folder; //ex. http://example.com/wp-content/uploads/2010/05/../../cats' 
       ```
   
 * in it’s place,
 *     ```
       $dir = $folder;
       $url = home_url();
       $outputDir = $url . '/' . $folder;
       ```
   
 * if my understanding is correct, I am no longer using the default upload directory(
   wp_upload_dir).
 * Original $dir appends the directory you are pointing to, to the wp default upload
   directory.
    $outputDir also uses the same default folder, so in it’s place, I
   have set it to read from the url + directory being pointed to ..
 * in your case, your shortcode would be
    `[MMFileList folder= "wp-content/uploads/
   2018/01/documentation/" ...`
 * again, i must reiterate this, as I have not fully read thru the entire code..
   
   DO AT YOUR OWN RISK..
    -  This reply was modified 8 years ago by [canonite](https://wordpress.org/support/users/canonite/).
    -  This reply was modified 8 years ago by [canonite](https://wordpress.org/support/users/canonite/).
 *  [canonite](https://wordpress.org/support/users/canonite/)
 * (@canonite)
 * [8 years ago](https://wordpress.org/support/topic/folder-path-3/#post-10315954)
 * Additionally, after reading the description page of the plug in ..
 * Usage Examples:
 * _Let’s say you’re using the default WordPress Media settings so we can expect
   your uploads folder to be in /wp-content/uploads/mm/yy/ with this in mind the
   shortcode “folder” attribute will look in a directory relative to this. With 
   this base directory say we want to list “png” files in the folder “/wp-content/
   uploads/cats/” we would use the following shortcode:_
 * `[MMFileList folder=”/../../cats/” format=”table” types=”png” /]`
 * If you have you disabled the setting to store uploads in the /mm/yy/ folder structure(
   you can do this within Settings -> Media) and wanted to display that same file
   you would use this shortcode:
 * [MMFileList folder=”/cats/” format=”table” types=”png” /]
 * This will result in a tabular list of all .png files in the /wp-content/uploads/
   cats/ folder.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Folder path’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/mmm-file-list_d6d6d6.svg)
 * [Mmm Simple File List](https://wordpress.org/plugins/mmm-file-list/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mmm-file-list/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mmm-file-list/)
 * [Active Topics](https://wordpress.org/support/plugin/mmm-file-list/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mmm-file-list/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mmm-file-list/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [canonite](https://wordpress.org/support/users/canonite/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/folder-path-3/#post-10315954)
 * Status: not resolved