Create nested folders in Win 98 SE

January 26, 2011 at 02:49:41
Specs: Windows 98 SE
I want to use a batch file to create some nested folders in Win98SE.

For example C:\test\Subfolder\another_folder\test

MD C:\test\Subfolder\another_folder\test
Works fine in Win XP but MD will only create one folder at a time in Win98SE and the above command line will return an error

Does anyone know how to make this work?


See More: Create nested folders in Win 98 SE

January 26, 2011 at 11:18:40
Wait for a neater solution but I suppose you could just repeat the command, like this:

MD C:\test
MD C:\test\Subfolder
MD C:\test\Subfolder\another_folder
MD C:\test\Subfolder\another_folder\test

We all live on a ball.

Report •

January 27, 2011 at 04:08:30
Thanks for the reply Derek but that will not work. I have a variable with the path set in it and the variable is passed into this batch file from another batch file and the variable changes each time this batch file is called.

So the command is

MD %test_pt%

where test_pt is set to c:\tpd\<project name>\<productname>\<variantname>

<Projectname>, <productname> and <variantname> can vary in value or not exist at all.....

So I need a solution that will work without knowing the folder names in advance...


Report •

January 27, 2011 at 19:23:18
Derek's solution is the only one working in 98 batch. 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 tool called oddly enough win95cmd.exe which was supposed to emulate win2k 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.


Report •
Related Solutions

Ask Question