Vbscript creating many folders

Very good vbscript if you need to create folders. In my cause i had to create for example in Archive folder many little subfolders from 001,002,..010,011…099,100 to 300.

ParentFolder = “C:\Archive”
set objShell = CreateObject(“Shell.Application”)
set objFolder = objShell.NameSpace(ParentFolder)
FOR i=1 to 9
objFolder.NewFolder “00”+CStr(i)
FOR i=10 to 99
objFolder.NewFolder “0”+CStr(i)
FOR i=100 to 300
objFolder.NewFolder CStr(i)


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: