Back to Blog

One Click Creation Of Load Test Project Folders

This simple script is something I use to create initial folders for my load testing projects. It save a little bit of time and ensures I always create the same folder structure. You need VBScript (vbs) files to be allowed to execute or it may not work properly for you. Install Windows Scripting Host if you do not already have the ability to do it on your machine. I have tested it on X pand Windows 7 and it seems to run fine. Paste this into a text file and then rename it to a .vbs extension. Then execute it. There should be a prompt to input the directory. I use this to name the root level folder based on the project name. Feel free to modify this script to add/modify/delete the names of all the folders you want to create depending on how you organize your load testing projects.

Be aware that vbs files are also the kind of files that have those nasty virii in them when sent and executed via e-mail. Always know what the vbs file is doing before you execute it. This may be restricted from running by your company depending on their security policies.

--------------------------------------BeginCode-----------------

Dim fso, s, o

s = InputBox( _
  "Type the full path name of the new directory you want to create.", _
  "New folder", "c:\" )

If s <> "" Then

  Set o = CreateObject("Scripting.FileSystemObject")

  If Not o.FolderExists( s ) Then
    o.CreateFolder s
    o.CreateFolder s & "\scripts"
    o.CreateFolder s & "\scenarios"
    o.CreateFolder s & "\analysis"
    o.CreateFolder s & "\results"
    o.CreateFolder s & "\html"
    o.CreateFolder s & "\data"
    o.CreateFolder s & "\documentation"
    o.CreateFolder s & "\templates"
  End If

  Set o = Nothing

End If

------------------------EndCode---------------------------
Back to Blog