New Scripts

This commit is contained in:
2020-06-09 10:33:32 +02:00
parent cf4187c0a6
commit f027830307
3 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
' MoveQuarantine.vbs - Move Mails in Quarantine Queue to Backup Folder
' Run Daily at 5am from Task Scheduler
' v1.0 - 08.06.2020 - Initial Release
' Define Constants for Environment on Server
Const strQuarantineFolder = "d:\MDaemon\CFilter\QUARANT\"
Const strBackupFolder = "d:\TEMP\Quarantine\"
' File System Object
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
' Define actual Backup Folder
strActualBackupFolder = strBackupFolder & fncDateString(now())
' Check, whether Target Folder exists
If Not objFSO.FolderExists(strActualBackupFolder) Then
objFSO.CreateFolder strActualBackupFolder
End If
' Move Files
objFSO.MoveFile strQuarantineFolder & "*.*", strActualBackupFolder
Function fncDateString(datDate)
' Format the Date as yyyymmdd
fncDateString = Year(datDate)& right("0" & Month(datDate),2) & right("0" & Day(datDate),2)
End Function