Delete Files Older Than X Days
This Automation Manager object deletes files older than a given number of days.
Privileges
The Task must RunAs as a domain admin or user account so it can see and access the folder's UNC path.
Input Parameters
Name | Type | Required | Description |
---|---|---|---|
File Pattern | String | Yes | The file name pattern to match. |
Full Path | String | Yes | The full (UNC) path of the folder where files will be deleted. |
Older Than days | Number | Yes | Files older than this number of days from the current date, that match the file pattern will be deleted. |
Output Parameters
Name | Type | Description |
---|---|---|
Result | Number | Returns a success value of zero, or any value other than zero to indicate failure. |
Result String | String | Object execution error details. |
Example Input Parameters
Name | Type | Description |
---|---|---|
File Pattern | String | *.txt, or Name*.txt |
Full Path | String | C:\folder1\folder2\ |
Older Than days | Number |
10
Partial days can also be used.
|