Convert a Set of Tests from an Older QuickTest Version to the Current Version
Source code
'This example specifies a folder in which tests from an older QuickTest version are
'stored and then loops through each test in the folder (and its subfolders) to open
'each one and save it in the current version format.

Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim filesys
Dim maindir
Dim testCol
Dim checkfolder

' Create the QuickTest Professional object
Set qtApp = CreateObject("QuickTest.Application")
qtApp.Visible = True

' Get the collection of test scripts
Set filesys = CreateObject("Scripting.FileSystemObject")

' TO DO: Specify the test script directory....
Set maindir = filesys.GetFolder("C:\temp")
Set testCol = maindir.SubFolders

' Loop through each test in the collection
For Each fl In testCol

    ' Verify the folder is a QTP test
    checkfolder = fl.Path & "\Action0"
    If (filesys.FolderExists(checkfolder)) Then ' The folder is a QTP test folder

       ' Convert test
       qtApp.Open fl.Path, False, False

       ' wscript.sleep 1000

       ' Save converted test

    End If


' Release the File System Objects
Set testCol = Nothing
Set maindir = Nothing
Set filesys = Nothing

' Release the QuickTest Professional application object
Set qtApp = Nothing