Page 1 of 1

Getting the filename

PostPosted: Wed Feb 01, 2012 7:07 pm
by kschuster
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

Re: Getting the filename

PostPosted: Mon Feb 13, 2012 6:43 pm
by jcompagner
what is importtarget?
why do you have that why don't you do thisfile.getName()