Count items in a folder with PowerShell

后端 未结 7 1253
闹比i
闹比i 2020-12-01 04:10

I\'m trying to write a very simple PowerShell script to give me the total number of items (both files and folders) in a given folder (c:\\MyFolder). Here\'s wh

相关标签:
7条回答
  • 2020-12-01 04:51

    To count the number of a specific filetype in a folder. The example is to count mp3 files on F: drive.

    ( Get-ChildItme F: -Filter *.mp3 - Recurse | measure ).Count
    

    Tested in 6.2.3, but should work >4.

    0 讨论(0)
提交回复
热议问题