VBS is a programming language used to computerize processes through simple text files. Files having .vbs extension are performed on double clicking file or place it in startup directory for Windows. Windows network administrators use files to find drives, remove or add folders and start other programs. One can make VBS file to add subdirectory to file folder destination on local user's device.



Commands
  • Open Notepad or text editor.
  • Make scripting object that makes folder. Object is used for file modification and folders too. Below given code makes file system object:

    Set objFile = CreateObject("Scripting.FileSystemObject")
  • Make a subfolder. The code below makes subfolder and allocates it to a variable. Variable can be used to modify folder properties:

    Set my_Folder = objFSO.CreateFolder("C:\folder\subfolder")
    "CreateFolder()" refers to the destination of new subfolder.
  • Print status of creation. Use console's "Echo" command to view output. The given below code says the folder is created:

    WScript.Echo "New folder created."
  • Give.vbs extension to file and save it. Open file on HDD. The VBS file executes and makes new folder on HDD.