하드 드라이브에서 @eaDir 폴더를 찾아서 삭제하는 스크립트
2025. 9. 7. 10:05
Scripts
# C: ~ G: 드라이브에서 @eaDir 폴더를 찾아서 삭제하는 스크립트
# 관리자 권한으로 실행해야 함
$drives = "C:\","D:\","E:\","F:\","G:\"
foreach ($drive in $drives) {
Write-Host "Scanning drive $drive ..." -ForegroundColor Cyan
Get-ChildItem -Path $drive -Recurse -Directory -Force -ErrorAction SilentlyContinue -Filter "@eaDir" |
ForEach-Object {
Write-Host "Deleting:" $_.FullName -ForegroundColor Yellow
Remove-Item -LiteralPath $_.FullName -Recurse -Force
}
}
Write-Host "✅ 모든 드라이브에서 @eaDir 폴더 삭제 완료!" -ForegroundColor Green