VB Script for Creating New Folder

Here is a sample VB Script code for creating new directory.
The code will launch a dialog box for input as directory name. If you pass correct name and press OK, directory will get created.

Option Explicit
Dim objFSO, objFolder, strDirectory
strDirectory = InputBox("This is the the input box will say") 
if(0 = StrComp(strDirectory, "")) Then
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.CreateFolder(strDirectory)
WScript.Echo "Directory : '" & strDirectory & "' created sucessfully."


  1. how to use that script?? should i use Visual Basic program?? sorry, i'm newbie

  2. Just copy pest this code in a text file. SAve it as a .vbs and double click that file. The script will execute.


Post a Comment

Popular posts from this blog

Error : login failed on rabbitmq web-management console

MSMQ error : "A workgroup installation computer does not support the operation."

How to flash CWM Recovery to Samsung Galaxy SL( GT-I9003) using Odin