Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve purge script #215

Closed
rschitz opened this issue May 28, 2020 · 2 comments
Closed

improve purge script #215

rschitz opened this issue May 28, 2020 · 2 comments
Assignees

Comments

@rschitz
Copy link
Member

rschitz commented May 28, 2020

Only remove folder content when ALL files are outdated

@rschitz rschitz added this to the 0.99g - Ravenholm milestone May 28, 2020
@rschitz rschitz self-assigned this May 28, 2020
@rschitz
Copy link
Member Author

rschitz commented May 29, 2020

Get-ChildItem -Recurse|Group-Object -Property Directory|?{$_.group.LastWriteTime|Sort-Object -Descending|Select-Object -First 1|?{$_ -lt (Get-Date).AddDays(-15)}}

@rschitz
Copy link
Member Author

rschitz commented Dec 11, 2021

@rschitz rschitz closed this as completed Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant