Option Explicit On Error Resume Next Dim a: a = WScript.Arguments.item(0) Dim fso: Set fso=CreateObject("Scripting.FileSystemObject") Dim lFolder: Set lFolder = fso.GetFolder(a) Dim lFiles: Set lFiles = lFolder.Files Dim lFile, numFiles numFiles = 0 For each lFile in lFiles RenameFile(lFile) Next Function RenameFile(fileObject) Dim oldName, newName, fullnewName Dim posDash, posParOpen, posParClose Dim artistName, songName, trackNum oldName = fileObject.Name 'get location of the dash posDash = InStr(oldName, "-") 'get location of the first ( posParOpen = InStrRev(oldName,"(") 'get location of last ) posParClose = InStrRev(oldName, ")") 'get the track number trackNum = Mid(oldName,1,posDash) trackNum = Replace(trackNum,"-","") trackNum = trim(trackNum) 'get the song name songName = Mid(oldName,posDash,Cint(posParOpen - PosDash)) songName = Replace(songName,"-","") songName = Trim(songName) 'get the artist name artistName = Mid(oldName,posParOpen,Cint(posParClose - PosParOpen)) artistName = Replace(artistName,"(","") artistName = Trim(artistName) 'new name formatted newName = trackNum & " - " & artistName & " - " & songName & ".mp3" fullNewName = fileObject.ParentFolder & "\" & newName WSCript.Echo WScript.Echo "Renaming.. " & fileObject.Name WScript.Echo "To........ " & newName fileObject.Move fullNewName WScript.Echo numFiles = numFiles + 1 End Function WScript.Echo "Total Files Modified: " & numFiles Set fso = Nothing Set lFolder = Nothing Set lFiles = Nothing