You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

krupal's avatar
krupal
Explorer | Level 3
8 years ago

Finding parent folder of file

Hi Support,

 

I want to find parent folder of files. Currently, I am using list_folders api using curl in php which gives me all data but I am unable to differentiate which files are under which parent folder. 

 

Please suggest me way to find that

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff
    The response from the list_folder endpoints will give you a list of file and folder entries. Each one will contain a `path_lower` value, which will be something like: "/Documents/document.docx". You can see the parent path components by splitting those out. E.g., in this sample, the "document.docx" file is in the "Documents" folder.