File rotation via BAT or Powershell command
Budget: $20 – $40 USD
Hi,
I have a simple powershell script:
Get-Process | Where-Object {$_.MainWindowTitle -ne ""} | Select-Object MainWindowTitle
I need it to run every 20 minutes (as a Windows scheduled task) and put the result to a file in
%userprofile%\Documents\.CurrentOpenWindows with filename yyyy-mm-dd hh-mm-ss - OpenWindows.txt
It needs to also remove any log files older than 24 hours.
The purpose of this is that sometimes a program (e.g. Outlook) crashes and I lose track of the windows that were open so I want a way I can look back and see what was open.
I have a simple powershell script:
Get-Process | Where-Object {$_.MainWindowTitle -ne ""} | Select-Object MainWindowTitle
I need it to run every 20 minutes (as a Windows scheduled task) and put the result to a file in
%userprofile%\Documents\.CurrentOpenWindows with filename yyyy-mm-dd hh-mm-ss - OpenWindows.txt
It needs to also remove any log files older than 24 hours.
The purpose of this is that sometimes a program (e.g. Outlook) crashes and I lose track of the windows that were open so I want a way I can look back and see what was open.