|Derek's solution is the only one working in 98 batch. Command.com is just not sophisticated enough yet to handle mutliple path MD directive.|
Your passed variable needs to be deconstructed into a text file and MD inserted for each tier required and then run it as a batch file before returning control to the calling batch file. You'll need more than batch for this one I'm thinking, something like the older t.exe tool in combination with batch. More common tools might work too.
There was the NT command.com tool called oddly enough win95cmd.exe which was supposed to emulate win2k command.com which may be able to do the job for those wanting the power of NT batch on 9x. But I've no experiance with it other than to have grabbed it when I saw it. It's very likely that you'll need to run it in a Windows DOS box in order to use it on 98 - I don't think it would run from true DOS mode and still function properly. There appears to be a registry entry that needs to be done in order to get it over to the job at hand also, up to you to flesh out the details, good luck.