option explicit Dim args set args = WScript.Arguments if args.Count <> 2 then MsgBox "Cover Downloader: Wrong number of arguments\n\nGive the folder name (not full path) as the first arg\n\nGive the output file name as the second arg" WScript.Quit 1 end if Dim re Set re = new regexp Dim shell Set shell = CreateObject("WScript.Shell") ' ' The next three lines use a regular expression search and replace ' to convert from strings of the form: ' Artist - Year - Album (e.g. "Nine Inch Nails - 2005 - With Teeth") ' to: ' Artist - Album (e.g. "Nine Inch Nails - With Teeth") ' Dim searchString re.Pattern = "^(.+) - [0-9][0-9][0-9][0-9] - (.+)$" searchString = re.Replace(args.Item(0), "$1 - $2") Dim outputFile outputFile = args.Item(1) ' ' Adjust the path below if you've installed the program somewhere else. ' Dim fullCommand fullCommand = """C:\Program Files\Album Art Aggregator\AlbumArtAggregator.exe"" """ & searchString & """ """ & outputFile & """" ' ' Change "FALSE" below to "TRUE" to debug ' if FALSE then MsgBox("Search String: " & searchString) MsgBox("Output File: " & outputFile) MsgBox("Command: " & fullCommand) end if shell.Run(fullCommand)