Dim strFiles As String = "d:\20160706101010.bak "
Dim strdate As String = FileSys.GetName(strFiles)
Dim Filesdate As String '文件日期
Dim strToDay As String '今天
Dim Intday As String
Filesdate = strdate.SubString(0,8)
strToDay = Format(Date.Today(), "yyyyMMdd")
Output.Show("文件日期与今天相差:" & strToDay - Filesdate & "天")
‘进行判断并进行相应删除代码……………………