79229598

Date: 2024-11-27 09:21:24
Score: 1.5
Natty:
Report link

In PowerShell, I was able to run the following line: Get-ChildItem -Path $logPath |? {!$.PSIsContainer -and $.Extension -eq ".log"} | Foreach{$_.Refresh()}

Before the line I wanted to use the LastWriteTime in: Get-ChildItem -Path $logPath | ? {!$.PSIsContainer -and $.Extension -eq ".log" -and $_.LastWriteTime -gt (Get-Date).AddSeconds(-35)} | Sort-Object -Property Name -Descending | Select-Object -First 1

Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Chris Chalmers