Computer >> Hướng Dẫn Máy Tính >  >> Hệ Thống >> Windows

Cách xóa file rỗng 0-byte trong Windows 11/10

Nếu cần xóa file rỗng 0-byte trong Windows 11/10, dùng dòng lệnh hoặc phần mềm miễn phí để làm nhanh. Zero-byte files là file không có dữ liệu.

Trước khi tiến hành, đọc – An toàn khi xóa Zero-byte files?

Cách xóa file rỗng 0-byte từ PC?

Trước khi bắt đầu, tạo điểm khôi phục hệ thống nếu dùng trên ổ hệ thống.

1] Xóa file rỗng dùng PowerShell

Mở PowerShell chạy lệnh:

Get-ChildItem -Path "D:\FolderName" -Recurse -Force | Where-Object { $_.PSIsContainer -eq $false -and $_.Length -eq 0 } | Select -ExpandProperty FullName | Set-Content -Path D:\EmptyFiles.txt

Lệnh này xuất danh sách file rỗng trong D:\FolderName ra file text EmptyFiles.

Để xóa tất cả file zero-byte, chạy lệnh:

Get-ChildItem -Path "D:\FolderName" -Recurse -Force | Where-Object { $_.PSIsContainer -eq $false -and $_.Length -eq 0 } | remove-item

2] Dùng freeware Find Empty Files and Folder

Cách xóa file rỗng 0-byte trong Windows 11/10

Tải và dùng phần mềm Find Empty Files and Folder. Phần mềm quét toàn ổ, phân tích file/thư mục, hiển thị thư mục và file rỗng nếu có.

Khi danh sách sẵn, duyệt qua file rỗng xem cái nào an toàn xóa. Xác định xong, nhấn Delete.

Hy vọng bài viết hữu ích.

Cách xóa file rỗng 0-byte trong Windows 11/10