PDA

View Full Version : Long filenames in DosCommand


giannisGR
06-04-2008, 05: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!

vScourge
06-05-2008, 12:37 PM
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-05-2008, 12:37 PM
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.