Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwroc committed Apr 29, 2021
1 parent 2323049 commit cb929cc
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,26 @@
# Remove-RedundantLogFiles
Script for removing old log files

## Features
* Shows number of files found
* Lists old files from given directory
* Adds scheduled task in the system to run on daily basis

![image](https://user-images.githubusercontent.com/8268674/116569000-e3b02c80-a900-11eb-8720-f9660ce0c1f4.png)

## Examples

Finds files 30 days old in given directory and asks what to do
```powershell
.\Remove-RedundantLogFiles.ps1 -FolderPath C:\inetpub\logs\LogFiles
```

Finds files 5 days old in given directory and asks what to do
```powershell
.\Remove-RedundantLogFiles.ps1 -FolderPath C:\inetpub\logs\LogFiles -DaysOld 5
```

Removes 10 day old files from given directory without any prompt and logs number of deleted files
```powershell
.\Remove-RedundantLogFiles.ps1 -FolderPath C:\inetpub\logs\LogFiles -DaysOld 10 -RemoveFiles
```

0 comments on commit cb929cc

Please sign in to comment.