Skip to main content

I'm doing a lot of restructuring of my organization's data, and it would be very helpful to directly get the ID of a file or folder through Box Drive (or, essentially what amounts to Finder on Mac).


I know that I can currently do this through a manual multi-step process by right-clicking the file, selecting "View in Box", and copying the trailing digits from the URL that displays. But all these steps start becoming tedious after a while, and it also makes it tough to build in automations on my desktop.


I know there is a Box Drive menu item called "Copy Shared Link", but that's not what I'm looking for, as the link can be deactivated and is not a permanent reflection of the file or folder itself.


What I'd like to do is have a function on my computer whereby the input is the path to the file (or folder) on Box Drive, and the output is its Box file/folder ID. I can then use that ID in the Box API to run larger scale automated tasks. The function can be either called upon in Terminal, or if I get that far, I can also make it into an Automator Quick Action and assign a keyboard shortcut to, say, copy the file ID to the clipboard.


I've looked everywhere for solutions to this but seem to be coming up empty. Is there a native function that I'm missing, or is there an easy way to script this that I'm missing?

Hi Phil,


Welcome to Box Community and glad to help!


It shows that you're already working with a member of our team. Please keep an eye out and we'll stay in touch. 


Thanks for posting! 


Reply