I want to download files according to the existing folder structure

Has anyone ever worked on or have suggestions for exporting files from the Frappe system according to the folder structure? The expectation is to generate a .zip file that maintains the folder structure as defined in the File Doctype

Example
folder = Main Folder

Expected result