How to query the scene name wihtout the file extension?
I've tried various forms of tokenize but can't manage this

Edit: Solved!
$name = `file -q -shn -sn`;
$name2 = `basenameEx($name)`;
HOWEVER.
Does anyone know how to query the current directory that the file is in?
Replies
since if you wanted that directory, wouldn't you just drop the -shn, and remove the file name from the string it gives you?
string $name = `file -q -sn`; substitute("[^(\\/)]*$", $name, "");or you could use the workspace command, if you use projects in maya.
returns the root directory of the project your in.