
Rotterdam asked a question.
Is it possible to set a maximum number of files in \ImportTool\ErrorRows ? IT IS possible in 'ImportTool\Backup' via Webconfigurator, but I can't find a setting for ErrorRows number of files.

Rotterdam asked a question.
→ Flexera One
→ Snow Atlas
→ FlexNet Manager
→ App Broker
Need help finding an answer?
Unfortunately, this is not possible.
You can, however, use a simple Powershell script for this, such as:
Remove-Item C:\path\to\files\* -Recurse -Force -Include *.* -Verbose | Where-Object { $_.LastWriteTime -lt (Get-Date).AddMonths(-2) }
This will delete all files in C:\path\to\files\* which are older than 2 months.
Thanks,
I finally went with;
Try {
$path = "C:\ImportTool\ErrorRows\Devices"
$fileCount = (Get-ChildItem $path | Where-Object { !$_.PSIsContainer }).Count
if ($fileCount -gt 20) {
$filesToDelete = (Get-ChildItem $path | Where-Object { !$_.PSIsContainer } | Sort-Object LastWriteTime | Select-Object -First ($fileCount - 20))
foreach ($file in $filesToDelete) {
Remove-Item $file.FullName -Force
}
}
}
Catch {
Write-Host "Cleanup didnt work"
}