Const kMsgBoxTitle = "iView MediaPro" Dim app, mediaItems, mediaItem, i, path,objDialog, intResult, srcThemePath, destThemePath, wShell, fso, themePath, prompt, inRet, UserPath Main() Sub Main() Set app = CreateObject("iView.Application") Set wShell = CreateObject("WScript.Shell") 'get the active catalog If (app.Catalogs.Count = 0) Then MsgBox "Please launch Iview MediaPro.", vbCritical, kMsgBoxTitle Else UserPath = wShell.ExpandEnvironmentStrings("%APPDATA%") UserPath = UserPath & "\iView\Plug-ins\HTML Templates\" themePath = getThemeNames(UserPath) prompt = "Please select the original HTML theme you want to copy:" & vbCr & vbCr For i = LBound(themePath) To UBound(themePath) Step 1 prompt = prompt & i + 1 & "- " & themePath(i) & Chr(13) Next srcThemePath = UserPath & InputBox(prompt, "Copy HTML Themes") If srcThemePath = UserPath Then Exit Sub End If ' Source HTML Folder name ' srcThemePath = path & themePath(inRet-1) ' Destination HTML Folder name destThemePath = srcThemePath & " - copy" Set fso = CreateObject("Scripting.FileSystemObject") For i = 2 To 100 If Not fso.FolderExists(destThemePath & " (" & i & ")") Then destThemePath = destThemePath Exit For End If Next fso.CopyFolder srcThemePath, destThemePath wShell.Run ("%windir%\explorer.exe " + destThemePath) End If End Sub function getThemeNames(path) Dim oFSO, oFolder, oFiles, i, result, ThemeArray() Set oFSO = CreateObject("Scripting.FileSystemObject") Set oFolder = oFSO.GetFolder(path) Set oFiles = oFolder.SubFolders dim j j=0 For Each i In oFiles result = Replace (i, path,"") redim Preserve ThemeArray(j) ThemeArray(j) = result j=j+1 Next getThemeNames = ThemeArray end function