Folder sizes are not displayed. How to find out the size of folders on a disk using PowerShell. Explorers showing folder sizes

Most Windows users are used to the fact that the easiest way to get the size of a folder is to open its properties in Windows Explorer. More experienced ones prefer to use utilities such as TreeSize or WinDirStat. But, if you need to get more detailed statistics on the size of folders in a specific directory, or exclude certain types of files, in this case it is better to use PowerShell. In this article, we'll show you how to quickly get the size of a specific directory on a drive (or all subdirectories) using PowerShell.

Advice. To get the size of a specific folder on a disk, you can also use the du.exe console utility.

To get the sizes of files and directories in PowerShell, you can use the commands Get-ChildItem(alias gci) and Measure-Object(alias measure).

The first cmdlet allows you to generate a list of files in a given directory using specified criteria, and the second one performs an arithmetic operation.

For example, to get the size of the c:\ps folder, run the command:

Get-ChildItem c:\iso | Measure-Object -Property Length -sum

As you can see, the total size of the files in this directory is indicated in the Sum field and is about 2 GB (size is indicated in bytes).

To convert the size to a more convenient MB or GB, use this command:

(gci c:\iso | measure Length -s).sum / 1Gb

(gci c:\iso | measure Length -s).sum / 1Mb

To round the result to two decimal places, run the command:

"(0:N2) GB" -f ((gci c:\iso | measure Length -s).sum / 1Gb)

(gci c:\iso *.iso | measure Length -s).sum / 1Mb

The above commands only allow you to get the total size of files in the specified directory. If a folder contains subdirectories, the size of the files in those directories will not be counted. To get the total size of all files in a directory, taking into account subdirectories, you need to use the parameter –Recurse. Let's get the total size of all files in the c:\Windows folder.

"(0:N2) GB" -f ((gci –force c:\Windows –Recurse -ErrorAction SilentlyContinue| measure Length -s).sum / 1Gb)

To take into account the size of hidden and system files, I additionally specified the argument –force.

So, the size of the C:\Windows directory on our disk is about 16 GB.

Advice. To not show directory access errors, use the parameter -ErrorAction SilentlyContinue.

You can get the size of all first-level subfolders in a specified directory. For example, we need to get the size of all user profiles in the C:\users folder.

gci -force "C:\Users" -ErrorAction SilentlyContinue | ? ( $_ -is ) | % (
$len = 0

$_.fullname, "(0:N2) GB" -f ($len / 1Gb)
}

% is an alias for the loop foreach-object.

Go ahead. Let's say your task is to find out the size of each directory in the root of the system hard drive and present the information in an easy-to-analyze tabular form with the ability to sort by directory size. To do this, we will use the Out-GridView cmdlet.

To obtain information about the size of directories on the C:\ drive, run the following PowerShell script:

$targetfolder="C:\"
$dataColl = @()
gci -force $targetfolder -ErrorAction SilentlyContinue | ? ( $_ -is ) | % (
$len = 0
gci -recurse -force $_.fullname -ErrorAction SilentlyContinue | % ( $len += $_.length )
$foldername = $_.fullname
$foldersize= "(0:N2)" -f ($len / 1Gb)
$dataObject = New-Object PSObject
Add-Member -inputObject $dataObject -memberType NoteProperty -name “foldername” -value $foldername
Add-Member -inputObject $dataObject -memberType NoteProperty -name “foldersizeGb” -value $foldersize
$dataColl += $dataObject
}
$dataColl | Out-GridView -Title “Size of subdirectories”

As you can see, a graphical representation of a table should appear in front of you, indicating all the folders in the root of the system drive C:\ and their size. By clicking on the table column header, you can sort the folders by size.

Instructions

Launch Explorer using the assigned hotkey combination WIN + E (Russian letter U). In addition to this method, there are others - for example, by right-clicking on the “My Computer” shortcut, you can select “Explorer” from the context menu that appears. Or you can simply double-click this shortcut or select “Run” from the main menu on the “Start” button, enter the command explorer and press the Enter key.

Navigate to the folder whose size you want to determine by sequentially opening the directories in the left pane of Explorer. When you reach the desired folder, click it and in the status bar you will see the total size of all files stored here. The status bar is located at the bottom edge of the file manager window. If it is not displayed in your Explorer, then expand the “View” section in its menu and click the item that is called “Status Bar”. Please note that the number in the status bar indicates the size of only the files in that folder, not taking into account the presence or absence of subdirectories.

Right-click this folder's icon in the left pane of Explorer if the folder contains subdirectories and you want to know their total size. In the context menu that appears, select the bottom line - “Properties”. A separate folder properties window will open, where on the “General” tab (by default) in the “Size” line you will see the total weight of all files in this directory along with the weight of files in all subfolders. In addition to the total weight, here you can find out the total number of files and subfolders.

Helpful advice

In the status bar of Explorer, you can also see the size of the remaining free space on the disk where the folder is located.

Before posting on the Internet, photographs must be compressed to a certain size, because... Large files can significantly slow down page loading. To find out the size of an uploaded photo in Linux, you need to use the programs from the standard package.

You will need

  • Operating system Linux Ubuntu.

Instructions

On Ubuntu Linux operating systems, the image size can be found directly from the file properties. To do this, open the folder with the image and right-click on the image. In the context menu that opens, select “Properties”.

A window with the title “Properties_file_name.jpg” will appear in front of you. The physical file size (in MB) is indicated on the “Basic” tab in the “Size” line. The actual size of the picture is indicated on the last “Images” tab in the “Width” and “Height” lines. To close the window, click the corresponding button.

To view the file properties and then edit it, you need to open the image through the Gimp program. Right-click on the image, select the “Open in program” section, then click on the line “Gimp Image Editor”. In the main program window, click the top menu “Image” and select “Image Size”.

In the window that opens, you will see the actual size of the image and can change it. To do this, change the value of the “Width” or “Height” blocks. After clicking on the “Edit” button, the edited image will be transformed.

Sometimes when cleaning the system of debris, there are cases when something large is lying somewhere, but it is not possible to find where exactly. And at the same time, optimizers of various kinds also cannot find these files, since often these files are not system files but user ones. This is where Explorer will help us, as it can show the size of folders. This feature is sorely lacking in the standard Windows Explorer.

Explorers showing folder sizes

1. The first on this list will be a program called TreeSize Free.

A small and free program that very conveniently displays the size and number of files in a folder. Hidden files are also shown. The application is in English, but this does not provide any discomfort in use. There are different sorting and filtering methods for convenient use.

You can download TreeSize Free from the following links below:

TreeSize Free (Yandex disk)

TreeSize Free (Mail cloud)

2. The next useful explorer in our review is called Explorer++.

It is a free Russian-language program that has a good set of functionality for convenient viewing of folders. There is also a function to show hidden files and show their size in bytes, kilobytes, megabytes, gigabytes. There is an advanced search function. Overall, a good replacement for the standard file manager.

You can download Explorer++ from the following links below:

Explorer++ (Yandex disk)

Explorer++ (Mail cloud)

3. The next application to review is called Folder Size Explorer.

It is a simple free file manager in English. I don’t even know what to add; functionally it’s practically no different from the previous ones. Has a file search and a subfolder counting calculator.

You can download Folder Size Explorer from the following links below:

Folder Size (Yandex storage)

Folder Size (Mail cloud)

4. Program number four is called Q-Dir.

It is worth paying tribute to this explorer, first of all, for the variety of panel displays, for example, 4, 3, or 2 panels can be shown in a window, despite the fact that they can be individually customized. The program is distributed free of charge and has a choice of 25 different languages. Large folder sizes are highlighted, but the size is not calculated as a standard. To activate this feature you need to do the following:

Press the F9 key and in the window that opens, select the “Internal Q-Dir algorithm” item, after which we update the window and see the result.

Q-Dir (Yandex disk)

Q-Dir (Mail cloud)

5. Explorer number five is called GetFoldersize.

In principle, it is also a fairly functional file manager. It is possible to select English and Russian languages, but there is some problem with the display of the font when choosing Russian. To correct it, you need to click on the red letter A and select one of the following fonts there: Courier, MS San Serif, Fixedsys.

I didn’t find anything else special that could be highlighted in it; personally, it seemed visually loaded to me. I also didn’t like that the program must first scan the local disk and only then produce the data; in the other listed programs it was much faster. Also distributed free of charge.

You can download GetFoldersize from the following links below:

(Yandex storage)

(Mail cloud)

6. The next program is called MeinPlatz.

This software will show the folder architecture including system and hidden files. There is a window display setting, search and several additional functions. Small size and the ability to choose Russian from nineteen possible languages. Good folder scanning speed. Free distribution.

(Yandex storage)

(Mail cloud)

7. The seventh penultimate explorer in the review is called WizTree.

The best thing I liked about this program was the speed of scanning local drives. Scanning is almost instantaneous; for me, 183 gigabytes took 2.39 seconds. A nice interface and good speed make this explorer a good solution for simple everyday tasks. It is also worth noting a very useful function that will help you radically clean your hard drive of the largest files, it is called “Top 100 large files”.

 
Articles By topic:
Your computer is broken: what should you do, repair it or buy a new one?
Many PC owners encounter various errors and malfunctions in their computer, but cannot determine the cause of the problem. In this article we will look at the main methods for diagnosing a computer, allowing you to independently identify and eliminate various problems.
How to get rid of a banner
After restarting the computer, the monitor displays a request to send a paid SMS, or to deposit money into a mobile phone account? Meet this, this is what a typical ransomware virus looks like! This virus comes in thousands of different forms and hundreds of variations. One
How to find out the size of folders on a disk using PowerShell
Most Windows users are used to the fact that the easiest way to get the size of a folder is to open its properties in Windows Explorer. More experienced ones prefer to use utilities such as TreeSize or WinDirStat. But, if you need to get more de
JPG To PDF Converter Convert images to pdf file
notice The service is available at notice In order to prevent excessive use of the service, Allinpdf has a limit of 60 uses per hour. This condition is subject to change. How to Convert JPG to PDF Drag and drop files from