Já tenho este VBScript para limpar esta pasta. Como posso adicionar o comando extra para pular o arquivo 'DoNotDelete.txt'? Você pode ajudar?
Atenciosamente, JvD
Dim fso, startFolder, OlderThanDate
Set fso = CreateObject("Scripting.FileSystemObject")
startFolder = "D:\tmp" ' folder to start deleting (subfolders will also be cleaned)
OlderThanDate = DateAdd("d", -04, Date) ' 04 days (adjust as necessary)
DeleteOldFiles startFolder, OlderThanDate
Function DeleteOldFiles(folderName, BeforeDate)
Dim folder, file, fileCollection, folderCollection
Set folder = fso.GetFolder(folderName)
Set fileCollection = folder.Files
For Each file In fileCollection
If file.DateLastModified < BeforeDate And StrComp(file.name,'donotdelete.txt', vbTextCompare) <> 0 Then
fso.DeleteFile(file.Path)
End If