I have a system that only outputs reports in Excel 97-2003, and a second system (for the user to look at) that only accepts these reports in CSV format.  The reports manager was previously opening each of the fifteen XLS reports, find/replacing all the commas with semicolons, saving as CSV, and renaming each file to the specific name that the second system requires.  I heard of his plight and wanted to try my hand at automating the process, so my hamfisted attempt - after about a day of combing through SO and various other sites - follows.It does work as intended, but I feel like I'm missing some obvious improvement.Option ExplicitDim objFS, objFolder, colFiles, re, objFile, intConvert, userContinue, objXL, objBook, objSheet, strBaseSet objFS = CreateObject(Scripting.FileSystemObject)Set objFolder = objFS.GetFolder(.\)Set colFiles = objFolder.FilesSet re = New RegExpre.Global     = Truere.IgnoreCase = Falsere.Pattern    = \.xls$intConvert = 0For Each objFile in colFiles  If re.test(objFile.Name) Then    intConvert = intConvert + 1  End IfNextIf intConvert = 0 then  MsgBox ChangeFile found no files to convert where it was opened. & vbNewLine & Exiting process.Else  userContinue = MsgBox (ChangeFile found  & intConvert &  files to convert where it was opened. & vbNewLine & _    Continue conversion process?, vbYesNo, Continue Conversion)  If userContinue = vbYes Then    'MsgBox Conversion beginning.    Set objXL = WScript.CreateObject(Excel.Application)    objXL.Visible = False    For Each objFile in colFiles      If re.test(objFile.Name) Then        Set objBook = objXL.Workbooks.Open(objFile.Path)        Set objSheet = objBook.Worksheets(1)        objSheet.Cells.Replace ,, ;        objBook.SaveAs Replace(objFile.Path, .xls, .csv), 6        objBook.Close True        strBase = objFS.GetBaseName(objFile)        Select Case strBase          Case [REDACTEDXLS1]            objFS.MoveFile strBase & .csv, [REDACTEDCSV1].csv          Case [REDACTEDXLS2]            objFS.MoveFile strBase & .csv, [REDACTEDCSV2].csv          Case Else            MsgBox strBase &  was not renamed - no match found        End Select      End If    Next    objXL.Quit    Set objSheet = nothing    Set objBook = nothing    Set objXL = nothing    Set objFS = nothing    MsgBox If you see this message, conversion was completed successfully.  End IfEnd IfNever mind the REDACTEDs.  My bosses can get a little leery of putting info out there sometimes.  There are only two specific cases listed thus far since I don't have the full list of requirements, which should get to me some time next week.  (Also they are sadly all non-uniform names on both sides of the transform, so theres no iteration that can be done.)Possibly more appropriate for SO: Ive also been advised that repeatedly opening/closing Excel like this can create phantom copies of Excel in memory, but testing with Windows 7 and Excel 2013 (which is what the report manager would be using) I see the second Excel process being created (when I'm already running one) and then removed at the end, so all appears to be well.  Is this something more applicable to an earlier iteration that Office 2013 fixes, or am I justified in worrying about it still?
VBscript XLS-to-CSV with minor transform
excel;vbscript