Never mind I got it. Here is the code if anyone is interested.
Dim Result1, Result2, x
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
Result1 = InputBox("Enter Begining Folder Number : ")
If Result1 = "" Then
Wscript.Echo "No input was given"
Result1 = InputBox("Enter Begining Folder Number : ")
End If
x = Result1
Result2 = InputBox("Enter Ending Folder Number : ")
If Result2 = "" Then
Wscript.Echo "No input was given"
Result2 = InputBox("Enter Ending Folder Number : ")
End If
If Result1 > Result2 Then
MsgBox "First number can't be greater than second number"
Wscript.Quit()
Else
For x = x to Result2 Step 1
If objFSO.FolderExists("C:\YourStuff\" & "000" & x) Then
Msgbox "Folder " & "000" & x & " already exists"
else
Set objFolder = objFSO.CreateFolder("C:\YourStuff\" & "000" & x)
MsgBox "This folder was created " & "000" & x
End If
Next
End If
WScript.Quit()
|