All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Login


All New Login

rcaldous

Joined 1705117468

Recently created
Least recently created
Recently updated
Least recently updated
All gists 11

rcaldous / deleteEmpty.ps1

0 likes
0 forks
1 files
Last active 1725105003
1 $LogPath = Read-Host 'Path to delete empty folders'
2 Get-ChildItem -LiteralPath $LogPath -Force -Recurse | Where-Object {
3 $_.PSIsContainer -and `
4 @(Get-ChildItem -LiteralPath $_.Fullname -Force -Recurse | Where { -not $_.PSIsContainer }).Count -eq 0 } |
5 Remove-Item -Recurse
Newer Older

Powered by Opengist ⋅ Load: 30ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文