Determine Max version with MAXscript

Hi everyone.

I try to determine the max version via MAXScript.

The only thing I found so far is the “maxOps.productAppID”-code which returns “max” as application, but I need to determine wether it is Max 2008, 2009 or 2010.

Didn´t succeed to fine the proper code in MAXScript-reference…

Any help?

Thanks and best regards.

Sascha

try maxVersion(), it returns an array where the first value is the release number, being “10000” max 2008, “11000” max 2009 …

Regards

local max_version = ((maxVersion())[1] / 1000) as string

where 10=max2009 11=max2010, etc…

Delete folder with white space name

Works fine, thanks.

Now I try to delete a folder with white space name, e.g. “C:\a test\”.

This code works fine:

doscommand "rmdir \"C:\a test\""0 is returned, the folder is gone.

…but I have to build the commandstring via script, so this doesn´t work:

myPath = "C:\\a test\\"
myString = "rmdir" + " \\" + "\"" + myPath + "\""
doscommand myString
```161 is returned and the folder is still there...

Any ideas?

Thanks and best regards.

**Sascha**

you might try ```
myPath = “"C:\a test\"”


I don't remember if that does the job or not, I remember I've had to jump through hoops to get it to work right, I've resorted to writing a bat file through script and running that instead.

or you can do it the .net way


mypath = "c:\\a test"
n_dir = (dotnetobject "System.IO.DirectoryInfo" mypath)
n_dir.delete()

Keep it simple

No, I had to keep it more simple:

myPath = "c:\a test"
myString = "rmdir" + " \"" + myPath + "\""
rmdir myString
```Works fine.

Thanks to Steve Curley on "The Area".

**Sascha**