---
updatedAt: 2025-08-14T13:35:51.000Z
agentTools:
  siteIndex: https://developer.n-able.com/llms.txt
  projectIndex: https://developer.n-able.com/n-central/llms.txt
---

# Veeam Latest Backup

```powershell VBS
Option Explicit 
Dim oFSO, oFolder, sDirectoryPath 
Dim oFileCollection, oFile
Dim iMinutesOld
Dim bFoundFile

' Specify Directory Path From Where You want to find the Veeam backup files 
sDirectoryPath = "C:\backup\Nightly VM Zip" 

' Specify number of minutes age of newest file in folder (e.g. 1440 minutes ensures at least one file newer than 24hrs old exists)
iMinutesOld = 1440 ' 24 hours

Set oFSO = CreateObject("Scripting.FileSystemObject") 
Set oFolder = oFSO.GetFolder(sDirectoryPath) 
Set oFileCollection = oFolder.Files 

bFoundFile = False
For each oFile in oFileCollection 
  If Datediff("n", oFile.DateLastModified, Now) <= iMinutesOld Then
    Wscript.Echo oFile.DateLastModified
    bFoundFile = True
  End If 
Next 

If bFoundFile = True Then
  ' At least one file newer than iMinutesOld exists so assume backup did run
	Wscript.Quit(0)
Else
	' No files found newer than iMinutesOld exists so assume backup did not occur
	Wscript.Echo "No files found"
	Wscript.Quit(1)
End If


```

```json Response Example
{"success":true}
```

# SCRIPT