Is there a way in Python to get the current/selected folder in the content browser?
The closest I’ve been able to get is:
unreal.SystemLibrary.get_project_content_directory()
which returns the system path to my project content folder. But what I want to get is the path to whatever folder I have selected in the content browser. Meaning…

I found this old post from back in 2015 where the OP was trying to do the same in C++. Judging by the last post in the thread, it seems he found some very roundabout way of getting the path. I don’t know C++ and I don’t quite understand the solution he describes, but I’m posting the link below in case it’s helpful to someone else:
https://forums.unrealengine.com/development-discussion/c-gameplay-programming/62069-get-current-content-browser-path?p=589507#post589507
TLDR: unreal.EditorUtilityLibrary.get_current_content_browser_path()
will get you the current content browser path in python
After doing a bunch of research I think I’ve figured out the strategy to solve this and other related functions.
Turns out there are a lot of functions in C++ that aren’t actually documented on their python API webpage even in the latest 5.1 documentation.
However, since C++ functions with UFUNCTION decorators are mostly exposed to python, the strategy is to print out all the functions in a given module in python by using the following for example:
for _ in sorted(dir(unreal)):
print(_)
This will get your a sorted list of all the functions.
By using:
for _ in sorted(dir(unreal.EditorUtilityLibrary)):
print(_)
You will see the get_current_content_browser_path pure function in the list. In terms of what argments and returns you can get, you can probably refer to the C++ source to get a good idea.
2 Likes
@chibitotoro I’ve only just seen this. Thank you so much for posting this answer.
It turns out that, almost 4 years after making the original post, today I once again needed a way to do this. So I actually ended up finding my post, and your answer, as the result of a google search 
Unfortunately that function doesn’t work for me as it doesn’t seem to exist in 4.27, which is the version of Unreal I’m using at work. I’m assuming it got added in 5 or 5.1.
Still, your method for getting a list of functions is very clever, and I’m sure it’ll come in very handy in the future. So thank you again!
2 Likes