Get Folder Size from Windows Command Line

前端 未结 17 2416
滥情空心
滥情空心 2020-11-28 18:52

Is it possible in Windows to get a folder\'s size from the command line without using any 3rd party tool?

I want the same result as you would get when right clicking

17条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-28 19:26

    There is a built-in Windows tool for that:

    dir /s 'FolderName'
    

    This will print a lot of unnecessary information but the end will be the folder size like this:

     Total Files Listed:
           12468 File(s)    182,236,556 bytes
    

    If you need to include hidden folders add /a.

提交回复
热议问题