Exporting to a mirror location

Hi I'm new to scripting so I'm asking for some of your time and help.

I have two directories, a C:\Source\Folder01\Test.max and I'd like to export the max file to another location under the same folder name, eg. C:\Game\Folder01\Test.fbx

I'm not sure how to define the export folder?

curObjectName = $.name
exportfolder = ???
exportpath = exportfolder + curObjectName

if doesFileExist exportfolder == false do (makedir exportfolder)

Thanks in advance for your help.

*Edit:
Sorry I should have mentioned that I don't want to hardcode the locations, but the script should detect the folder that the max file is in, and then look for the same folder name in the mirror location.

Comments

Comment viewing options

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

Use this exportfolder =

Use this

exportfolder = @"C:\Game\Folder01\Test.fbx"

barigazy

Comment viewing options

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