Getting the filename

Just getting started…

I’m building a function to show the file open dialog then I want to parse the path and filename into their own variables.

Running latest version 6.0.5

var thisfile = plugins.file.showFileOpenDialog(1,null,false);
importTarget = thisfile
fileName = importTarget.getName();

getName() here is highlighted with this remark - The function getName() is undefined in this script

getName is under file/JSFile - how do I use this??

Thanks in advance

what is importtarget?
why do you have that why don’t you do thisfile.getName()