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
WScript.Quit
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.CreateFolder(strDirectory)
WScript.Echo "Directory : '" & strDirectory & "' created sucessfully."
WScript.Quit 

2 comments:

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

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

    ReplyDelete

Golang: Http POST Request with JSON Body example

Go standard library comes with "net/http" package which has excellent support for HTTP Client and Server.   In order to post JSON ...