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
WScript.Quit
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.CreateFolder(strDirectory)
WScript.Echo "Directory : '" & strDirectory & "' created sucessfully."
WScript.Quit
how to use that script?? should i use Visual Basic program?? sorry, i'm newbie
ReplyDeleteJust copy pest this code in a text file. SAve it as a .vbs and double click that file. The script will execute.
ReplyDelete