When using the file explorer component, is there a way to get the name of the selected file within the File Explorer component? I failed to see a property or method that would do this, I know that there is a selected path method, but I need just the filename.
EDIT: Further than returning just the filename, is it possible to return a select number of the directors, for example the first 3 folders or the last 3 folders?
EDIT: I developed a bit of code that would do this, but it is not optimal. I would have preferred that there be a dedicated API method. However if anyone else needs to know how to do this here is my code:
counter = 0
for counter in range(0, len(selectedPath)):
selChar = selectedPath[(-counter - 1)]
if selChar == '\\' or selChar == '/':
filename = selectedPath[-counter:-4]
For now though, unless I am told otherwise, I will leave this post open incase someone finds a function or other that will return the filename and would like to post it up on here.