Loading
  • Detlev Eufinger (Flexera Software)

    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.

     

     

    Expand Post
  • 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"

      } 

     

     

    Expand Post

Related  Product Forums


                     â†’ Flexera One



                      â†’ Snow Atlas



                      â†’ FlexNet Manager



                      â†’ Snow License Manager



                       â†’ App Broker


       Need help finding an answer?


        Ask a Question →


Loading
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.