Forum Discussion

krupal's avatar
krupal
Explorer | Level 3
9 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

1 Reply

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago
    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.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!