cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you interested in hearing how one of our Community members uses Dropbox for sailing trips? Read all about it here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Get parent folder

Get parent folder

suzuka
Explorer | Level 4

Is there any way to get parent folder from child file or folder metadata.

1 Reply 1

Greg-DB
Dropbox Staff

@suzuka If you have the metadata for a file or folder, e.g., as returned by /2/files/get_metadata, that will include a path_lower, like: 

"/homework/math/prime_numbers.txt"

 

You can parse the path to get the parent folder, e.g., in this example:

"/homework/math"

 

You can then use /2/files/get_metadata again with that path to get the full metadata for that.

Need more support?