From: Greg Ercolano <erco@(email surpressed)>
Subject: [Q+A] Using submit-3dsmax, how to fix the error "'C:/Program' is
   Date: Fri, 29 Sep 2006 20:03:13 -0400
Msg# 1383
View Complete Thread (1 article) | All Threads
Last Next
> I've installed 3dsmax version 8, which installs itself into the directory:
>
>    C:\Program Files\Autodesk\3dsMax8
>
> I modified this line in the stock submit-3dsmax.pl script:
>     $ENV{'3DSMAX_ROOT'} = "c:/3dsmax6";
>
> ..to now read:
>
>     $ENV{'3DSMAX_ROOT'} = "C:/Program Files/Autodesk/3dsMax8";
>
> ..but I'm getting this error:
>
> Executing: C:/Program Files/Autodesk/3dsMax8/3dsmaxcmd -frames:9-9 -o:c:\temp -v:5 test.max
> 'C:/Program' is not recognized as an internal or external command,
> operable program or batch file.
> --- 3DSMAXCMD FAILED: EXITCODE=1

    Yes, spaces usually cause trouble in most command line contexts,
    as they are argument separators in DOS and the unix shells.

    You can try to protect the spaces with quotes, but it's always a hassle
    trying to figure out how many levels of shells are going to be stripping
    off quotes.

    To protect the spaces, try finding the section that reads:

        [..]
        # COMMAND TO EXECUTE
        my $command = "$ENV{'3DSMAX_ROOT'}/3dsmaxcmd -frames:$opt{sfrm}-$opt{efrm} ".
        [..]

    ..and change it to instead read:

	[..]
        # COMMAND TO EXECUTE
        my $quote = '"';
        my $command = "$quote$ENV{'3DSMAX_ROOT'}/3dsmaxcmd$quote -frames:$opt{sfrm}-$opt{efrm} ".
	[..]

    ..so that when the script runs, it should end up printing in the log:

Executing: "C:/Program Files/Autodesk/3dsMax8/3dsmaxcmd" -frames:9-9 -o:c:\temp -v:5 test.max
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    ..which is what is needed to get the space between "Program" and "Files" properly protected.

Last Next