Get list of subfolders on Dropbox

How can I get the names of all sub-folders of a Dropbox Path?

I’d like to use these names to populate a Chose from List input for use in a more elaborate Shortcut. You might have seen my much longer post on that topic.

Hopefully this focused question is easier to answer!

Unfortunately, Shortcuts currently only let’s you work with files, not folders in what might be termed a fully functional way.

I’ve had a quick look at utilising Scriptable to do the listing, but Dropbox is one of the many storage providers that doesn’t seem to support the functionality Scriptable needs to use - presumably file bookmark compatibility.

You could look at triggering some external script to generate such a list for Dropbox. Maybe on a remote desktop machine (via SSH). Or maybe a call to a web service like Zapier or Integromat could generate a sub folder listing as a JSON return to a webhook call?

Thanks for the info! I was afraid that might be the case. I wasn’t having much luck googling the problem which is often a tip off that something isn’t a straightforward task.

I’m a novice Shortcuts user and a non-scripter in any other way (unless triggering HomeKit scenes counts), though I’m obviously interested in learning. I want to be reasonable in the scope of complexity I take on here. I’ve heard of Zapier. How novice-friendly is Zapier? I’d give it a try if its somewhere in the neighborhood of Shortcuts in terms of user-friendliness.

I suggest you check out their intro videos.

https://www.youtube.com/playlist?list=PLqzJRGwum4KOTnrZpGBW0ESShZPxTFQWZ

I haven’t looked in detail as to if this could meet your specific need, but it seems like a logical place to look.

I think Zapier probably can do what I need, but it is a little over my head.

I think what I do is have Zapier trigger Dropbox to append a new line (containing a new folder name) each time a new folder is created in one of my client folders. Zapier’s Dropbox actions seem to allow the appending of data to a file natively. Then things get a little fuzzy: I somehow pickup the content of this file and populate my choose from List action. I guess this is where URL hooks come in? Or can I fill some kind of Shortcut variable woth the content of a file saved on Dropbox via a Shortcut action?

1 Like

If you assume that files have file extensions and that folders don’t (which isn’t necessarily always the case but is for my Dropbox files) then you can sort of do it

You have to iterate through the results, and the way to do that is to have a shortcut that calls itself.

https://www.icloud.com/shortcuts/39fb0b43c400479386600e2719c78f63