Notifications
Clear all

[Closed] Long filenames in DosCommand

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!

1 Reply

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.