how to query the file name

I want to query the file name so that I can add a postfix then save it as a new name. But I can't seem to figure out how to cast the current working file name into a variable.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anton Berg's picture

--this returns the filename

--this returns the filename of your current scene,
--if saved else it will return ""
maxFileName

-- this returns the path to this file
maxFilePath

--so
FullPathtoMyFile = (maxFilePath + maxFileName)

--should do the trick as long as you
--have saved your file somewhere

OgmaSoul3D
Anton Berg
anton[at]os3d.se

nycwtorres's picture

Thanks.. the maxscript ref

Thanks.. the maxscript ref file is very hard to get info from. I appreciate it.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.