Dim objdict,objFSO,objFldr Set objdict=CreateObject("Scripting.Dictionary") Set objFSO=CreateObject("Scripting.FileSystemObject") Set objFldr=objFSO.GetFolder("S:\") For Each file in objFldr.Files iYr=Year(file.DateLastModified) if objdict.Exists(iYr) Then 'get current value iTmp=objdict.Item(iYr) 'remove existing dictionary key objdict.Remove(iYr) 'add it back with new value objdict.Add iYr,iTmp+1 Else 'add dictionary key with year for keyname objdict.Add iYr,1 End If Next 'display results strHeader="YEAR #FILES" WScript.Echo strHeader arrYears=objdict.Keys For y=0 To objdict.Count-1 'define number of spaces so that numbers are right aligned iSpaces=Len(strHeader)-4-Len(objdict.Item(arrYears(y))) WScript.echo arrYears(y) & Space(iSpaces) & objdict.Item(arrYears(y)) Next