Title: Create Folder for uploaded Files
Last modified: January 6, 2021

---

# Create Folder for uploaded Files

 *  Resolved [silentblast](https://wordpress.org/support/users/silentblast/)
 * (@silentblast)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/create-folder-for-uploaded-files/)
 * Hi there, I saw a post regarding uploading files and creating a new folder to
   put those files into, but it did not work for me. Do you have a new way of doing
   this?
 * The goal is to dump attached file in the form into a specific folder and hopefully“
   Auto delete” if possible. Just dont; want to dump in WP root structure – hard
   to find those files uploaded by form users.

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

 *  Plugin Support [Jair – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport15/)
 * (@wpmudevsupport15)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/create-folder-for-uploaded-files/#post-13879742)
 * Hey there [@silentblast](https://wordpress.org/support/users/silentblast/), I
   hope you are well.
 * I just tested three options based on the path that you would like to save them,
   you can try any of the following:
 * [https://gist.github.com/wpmudev-sls/46d776223d9d54c732fd409b2e78c8a9](https://gist.github.com/wpmudev-sls/46d776223d9d54c732fd409b2e78c8a9)
   
   it sets the upload path to wp-content/forminator (outside the uploads folder).
   You can change that path in this line : private $path_part = ‘/forminator/’;
 * There are a few more complex requests like :
 * [https://gist.github.com/wpmudev-sls/a22b51fa5448c2d8f1eea4f49dd5e981](https://gist.github.com/wpmudev-sls/a22b51fa5448c2d8f1eea4f49dd5e981)
   
   This changes the upload folder to uploads/forminator/member_name
 * or
 * [https://gist.github.com/wpmudev-sls/639f2b6d711016e74ffa86d3a8e3c0d3](https://gist.github.com/wpmudev-sls/639f2b6d711016e74ffa86d3a8e3c0d3)
   
   which sets the path to wp-content/forminator/form_id/YYYY/MM/DD/submission_id
 * The file must be uploaded into wp-content/mu-plugins (if mu-plugins doesn’t exist,
   you can create it).
 * Test the methods one at a time, and create a backup before testing it, preferably,
   test it on staging or a local environment.
 * Let us know how it goes 🙂
 * Regards,
 * Jorge
 *  Plugin Support [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * (@wpmudev-support2)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/create-folder-for-uploaded-files/#post-13917067)
 * Hello [@silentblast](https://wordpress.org/support/users/silentblast/) ,
 * We haven’t heard from you for a while now, so it looks like your query was solved
   by Jorge.
 * Please feel free to re-open this ticket if needed.
 * kind regards,
    Kasia

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

The topic ‘Create Folder for uploaded Files’ is closed to new replies.

 * ![](https://ps.w.org/forminator/assets/icon-256x256.gif?rev=3443182)
 * [Forminator Forms – Contact Form, Payment Form & Custom Form Builder](https://wordpress.org/plugins/forminator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/forminator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/forminator/)
 * [Active Topics](https://wordpress.org/support/plugin/forminator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/forminator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/forminator/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/create-folder-for-uploaded-files/#post-13917067)
 * Status: resolved