PowerShell Log File Cleaner App

v1
Model: Claude Level: Intermediate πŸ‘ 1 πŸ“‹ 0
automationcleanuplogsPowerShellWindows
Prompt 28 words

Draft a PowerShell script that finds and deletes all .log files older than [X] days in [folder], outputs a summary to the screen, and logs to a file.

Useful prompt but the real issue is bigger? That usually means the workflow or team mechanism needs attention, not just the wording.

Why It Works

Saves disk space, automates routine cleanup, and documents what was deleted.

Example Output

Folder: C:Logs, Days: 30. Script: Get-ChildItem, Remove-Item, Write-Output, log to C:CleanupReport.txt.

Suggest an Improvement

Log in to suggest improvements.

Related Prompts