MAXScript Language Reference > Names, Literal Constants, and Expressions > Literal Constants >

# Spaces and Other Special Characters in Pathnames

3ds Max lets you use any characters you want in object names, including spaces and other MAXScript punctuation.

You can write pathnames that contain these characters by putting the name in single quotes,

FOR EXAMPLE:
    $'a silly name!!'

These quotes do not hide wild-card characters, so if you happen to have an object in your scene with a "*" in its name, you have to escape the "*" character in the pathname with a backslash,

FOR EXAMPLE:
    $'what the \*'

See String Literals for other escape character sequences.

Because of the large number of names in 3ds Max that include spaces, the underscore character ("_") can be used instead of a space in a name.

FOR EXAMPLE:
the following two lines are equivalent:
    bodyPart=$'Bip01 L UpperArm'
    bodyPart=$Bip01_L_UpperArm