'Ok, you owe me. Copy this text and put it in a file called 'newfolder.vbs' and double click it. Then create folders as fast as you can type. To uninstall it, doubleclick the file called 'newfolder.vbs' again.
Option Explicit
'take this text and save the whole thing as a file called 'newfolder.vbs'
'then double click it. This will prompt you if you want to install this program
'this progam will add an item to your explorter 'right-click' menu called 'New Folder'
'when you right click on a folder a box will popup asking you for a folder to make.
'you can enter an entire tree (like 'evad\man\is\cool' and all 4 directories will be
'made. It will then keep poping up until you hit cancel or leave the folder
'entry blank. This will allow you to create a bunch of folders very fast.
'well, as fast as you can type.
'This is open source. Take it an modify as you want. Just don't sue me if it does soemthing wierd. You are responsible for testing this thing.
'if you install it on a production system then you are dumb anyway. If you take it and claim it as yours, you suck.
Dim fso, ws, Args, Title, ParentFldr
Set fso = CreateObject("Scripting.FileSystemObject")
Set ws = CreateObject("Wscript.Shell")
Set Args = WScript.Arguments
Title = "Create New Folder Tool"
'Validate correct version for script.
If WScript.Version < 5.1 Then
ws.Popup "You need Windows Script Host 2 or better (version 5.1) to run this script. Your computer is old, please get a new one.", , Title, 0 + 48 + 4096
Call CleanupObjects
End If
'If script called directly, check setup & uninstall.
If Args.Count = 0 Then
Call AddToRegistry
End If
'mult fodlers nto allowed. This would alternate between the 2 folders, and the user would have no idea where the next folder was going to be created as the fodlers are passed in wierd orders.
If Args.Count > 1 Then
Call CleanupObjects
End If
'If a file was dragged to script, exit
On Error Resume Next
Set ParentFldr = fso.GetFile(Args(0))
If Err.Number = 0 Then
Call CleanupObjects
End If
Set ParentFldr = Nothing
On Error GoTo 0
Call MakeNewFolder
Call CleanupObjects
Sub MakeNewFolder 'make the folder
Dim NewFldr, i, forever, defaultfolder, MsgToDisplay, DirectoryName, multdir, FullDir
On Error Resume Next
defaultfolder = ""
DO until forever
if not defaultfolder = "" then MsgToDisplay = "Folder '" & defaultfolder & "' created in " & fso.GetFolder(Args(0)) & ". " & vbcrlf & vbcrlf & "Name for next Folder? " & vbcrlf & vbcrlf & "Leave blank or press cancel to exit."
if MsgToDisplay = "" then MsgToDisplay = "Name for New Folder?"
NewFldr = InputBox(MsgToDisplay, Title, defaultfolder)
IF NewFldr = "" then call CleanupObjects
defaultfolder = NewFldr 'default to the name of the last one
FullDir = ""
'if there is a slash in the name then turn that into a new sub directory
NewFldr = replace(NewFldr, "/", "\") 'fix dumbasses data enterers. This is ATOT after all.
if right(NewFldr,1) = "\" then
NewFldr = left(NewFldr,len(NewFldr)-1)
end if
'remove invalid characters from stupid people
if not NewFldr = RemoveChars(NewFldr,":*?<>|""") then
Msgbox "You have entered an illegal character. Don't worry though, I will fix it for you. Just because I happen to like you."
NewFldr = RemoveChars(,":*?<>|""")
end if
multdir = split(NewFldr, "\")
if ubound(multdir) > 0 then 'slahies. make directory structure
FullDir = fso.GetFolder(Args(0))
for i=0 to ubound(multdir)
FullDir = FullDir & "\" & multdir(i)
fso.CreateFolder FullDir
If Err.Number = 58 Then
Err.Clear
ws.Popup Chr(34) & FullDir & Chr(34) & " already exists. Skipping that one.", ,Title, 0 + 48 + 4096
ElseIf Err.Number = 52 Then 'dumbass used invalid characters that I didn't catch.
Err.Clear'

n Error GoTo 0
ws.Popup Chr(34) & NewFldr & Chr(34) & " contains invalid character(s).", ,Title, 0 + 48 + 4096
End If
next
else 'make single directory
fso.CreateFolder fso.GetFolder(Args(0)) & "\" & NewFldr
If Err.Number = 58 Then
Err.Clear'

n Error GoTo 0
ws.Popup Chr(34) & NewFldr & Chr(34) & " already exists.", ,Title, 0 + 48 + 4096
'Call MakeNewFolder
ElseIf Err.Number = 52 Then
Err.Clear'

n Error GoTo 0
ws.Popup Chr(34) & NewFldr & Chr(34) & " contains invalid character(s).", ,Title, 0 + 48 + 4096
'Call MakeNewFolder
End If
end if
loop
End Sub
Sub AddToRegistry
'Write Reg Data if not existing or if path is invalid.
Dim p
On Error Resume Next
'add key to add to explorer rightclick menu
p = ws.RegRead("HKCR\Folder\shell\NewFolder\command\")
p = Mid(p, 10, Len(p) - 15)
Err.Clear

n Error GoTo 0
If NOT fso.FileExists(p) Then
If ws.Popup("Do you want to Install the Folder context menu for creating a new folder?", , Title, 4 + 32 + 4096) <> 6 Then
Call CleanupObjects
End If
'write to reg in HKCR
ws.RegWrite "HKCR\Folder\shell\NewFolder\","&New Folder"
ws.RegWrite "HKCR\Folder\shell\NewFolder\command\", _
"WScript " & chr(34) & WScript.ScriptFullName & chr(34) & " " & chr(34) & "%1" & chr(34)
ws.Popup "Setup complete. Right click on any Drive or Folder in Windows Explorer and select the " & chr(34) & "New Folder" & chr(34) & "option to create a new folder there." & vbcrlf & vbcrlf & "To Un-install, run this script again.", , Title, 64 + 4096
Else 'unisnall by removing reg entries
If ws.Popup("Do you want to Un-install the Folder context menu for creating a new folder?", , Title, 4 + 32 + 4096) <> 6 Then
Call CleanupObjects
End If
'remove reg entries created.
ws.RegDelete "HKCR\Folder\shell\NewFolder\command\"
ws.RegDelete "HKCR\Folder\shell\NewFolder\"
ws.Popup "Uninstall complete.", , Title, 64 + 4096
End If
Call CleanupObjects
End Sub
Function RemoveChars(InputString, LettersToDrop)
Dim TempStor1
Dim CharStor1
Dim CurPlace
For CurPlace = 1 To Len(InputString)
CharStor1 = Mid(InputString, CurPlace, 1)
If InStr(LettersToDrop, CharStor1) = 0 Then TempStor1 = TempStor1 & CharStor1
Next
RemoveChars = TempStor1
End Function
Sub CleanupObjects
Set ws = Nothing
Set fso = Nothing
Set Args = Nothing
WScript.Quit
End Sub
'<edit>
'stupid emoticons screwing up my code. Fixed.