Document template: get current folder in file browser?
When creating a document template is it possible to determine which folder is currently selected in the file browser?
It's seems like the the create file action has that information according to the docs:
The file will always be created in the folder that is currently selected in the file browser.
But is there a general way to get access to that information?
Do you want that information before the document template file is created or after the file is created?
Python does offer
import os ; print(os.getcwd())but that might not work in your instance.
I want it before the template document is created. I assume that would fall more on the editor to provide the information since it knows which directory I'm currently looking at in the file browser.
editormodule in Editorial has a
get_selected_folderfunction (new in 1.2), so it's possible to get that information from a Python script.
That's great news - thank you.
Would there be any chance of also having editor.set_selected_folder, please?
There are a few key folder hierarchies that I go to many times a day, and it would be wonderful to be able to create a few workflows, to go to the most frequent in single clicks.
(The first one I'd write would be 'Go to the root of Dropbox' - I'm often 6 or 7 levels down from the root, and it gets a bit tedious getting to the top, one folder at a time!)
Thanks for the info, that's really great to know. I think I'll be able to do what I wanted now :)