View Full Version : Long filenames in DosCommand

06 June 2008, 04:15 AM
Hi All,

scriptdir = GetDir #scripts
hapconvpath = scriptdir + "\\Startup\\accconv"

DosCommand (hapconvpath + ............)

The above fragment of code works fine in 3d studio max 5.0 where the filepath is "C:\3dstudiomax...." but not in 3d studio max 2008 where the path is C:\Program Files\.... Do you have any suggestions on how to fix this? Please help!

06 June 2008, 11:37 AM
Try something like this:

scriptdir = "\"" + getDir #scripts + "\\startup\\accconv"
cmdStr = scriptdir + ......... + "\""
DosCommand cmdStr

Since the path to your max folder has spaces in it, you need to wrap the whole pathname in quotes for the command-line parser to treat it as a single argument.

CGTalk Moderation
06 June 2008, 11:37 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.