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.

Try in ChatGPT Try in Claude

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