原来VBS已经落寞到给批处理当垫脚石了- 'Author: Demon
- 'Website: http://demon.tw
- 'Date: 2011/12/22
- Const SrcDir = "F:\201221test\smppbillstore"
- Const DaysAgo = 1
- DstDate = Replace(Date - DaysAgo, "/", "")
- Set re = New RegExp
- re.Pattern = DstDate
- Set fso = CreateObject("scripting.filesystemobject")
- For Each file In fso.GetFolder(SrcDir).Files
- If re.Test(file.Name) Then
- WScript.Echo file.Name
- 'file.Delete
- End If
- Next
复制代码
|