1. First, create a custom field on your Custom object or Standard object. Or you can choose an already existing field for the object.
  2. Search for the tab Excluded Object. 
  3. If you are unable to find it, proceed to the next step, otherwise skip to step number 5.
  4. Go to the Setup and search for "Tabs" in Quick Find. Click on "Tabs" and create a new "Tab" for the object excluded object (Namespace: DownloadFiles). Follow these steps to create a tab: https://help.salesforce.com/articleView?id=creating_custom_object_tabs.htm&type=5
  5. Go to the excluded object > Create a ListView "All" and add Excluded Object Number, Object API Name, and Folder Name as the three fields in the list view as shown in the screenshot.
  6. Hit save. Look for the object for which you want to change the folder name. Edit that particular record's folder name with the newly created formula field (API Name) as shown in the screenshot. Then click the save button. 
  7. Now go to the MFD tab/ lightning component and refresh it. You will now be able to download the files with the newly set folder name.