Home > PowerShell > Use powershell to find zero size/byte files

Use powershell to find zero size/byte files

Below scripts helps you to find files with zero file size. Run this piece of code from root of your system from powershell window.

Get-Childitem -Recurse | foreach-object {
    if(!$_.PSIsContainer -and $_.length -eq 0) {
        write-host (“{0} -> {1}” -f $_.FullName, $_.Length)
        }
}

You can also refer to below article on how to find files older than certain size.

http://techibee.com/powershell/list-the-files-greater-than-given-size-using-powershell/163

No related content found.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>