If you want to know what THNKR is talking about, check the MEL command reference page in Maya, look at the "file" command.
Those are all abbreviations for stuff, eg. "-shn" means "-shortName", which returns just the file name instead of the full path to the scene - quite useful for various naming scripts etc.
Replies
and I recommend you then use this if you need just the file name without the extension
file -q -sn -un ;
file -q -sn -shn;
file -q -sn -wcn;
Those are all abbreviations for stuff, eg. "-shn" means "-shortName", which returns just the file name instead of the full path to the scene - quite useful for various naming scripts etc.
MoP yep that's what i did, I'm a script noob so it didn't really occur to me at first, and yeah super useful for naming
Looks like this command prints the path. but how do I extract the names of folders individually from the path and assign to variables ?
I am trying out scripting for the first time to create a certain functionality. Any help in this regard would be appreciated. Thanks!
https://nccastaff.bournemouth.ac.uk/jmacey/RobTheBloke/www/mel/IO_dir_list.html