title: Detect Last Modified of a file when displaying in a list
body: <p>I need to change a script which runs every 30 minutes. What it currently does, is checks for the presence of a file, and if it's currently in the location when the script runs, it will return the filepath for us to go an investigate why it hasn't been moved out yet.</p>
  <p>We can't run this on the main import location because there are constantly files and it would result in an email every 30 minutes forever.</p>
  <p>Can you please assist adding in a check for the date last modified on the item, so only those older than 30 minutes, when the check is run every 30 minutes, will be returned?</p>
  <pre><code>function folder_check  {
      param (
          [Parameter(Mandatory=$true)] [string]$folder
      )
  
      if((Get-ChildItem -Attributes !Directory+!System, !Directory+!System+Compressed $folder -force | Select-Object -First 1 | Measure-Object).Count -gt 0)  {
          Write-Host &quot;Found&quot;
          return 1;
      }
      Write-Host &quot;Not found&quot;
      return 0;
  }
  </code></pre>
  <hr />
  <pre><code>foreach ($folder in $folders) {
      Write-Host &quot;Checking $folder&quot;
      
      if (folder_check $folder)  {
          $found_folder = 1;
          $lst = (gci -Attributes !Directory+!System, !Directory+!System+Compressed -Path &quot;$folder&quot; -Force | Out-String -Width 80)
          $body = ($body + $lst);
      }
  
  }
  </code></pre>