Windows 10 Show File Size In Mb

How to find the size of a file

By default in Windows 10, you can quickly view the size of folders in an infotip (pop-up description) by hovering over the folders in File Explorer or on your desktop. There are instances where turning this option off may provide a performance increase (for example, complex, multi-level nested folder structures) on the local system. Apr 30, 2020 Right-click the file and click Properties. The image below shows that you can determine the size of the file or files you have highlighted from in the file properties window. In this example, the chrome.jpg file is 18.5 KB (19,032 bytes), and that the size on disk is 20.0 KB (20,480 bytes).

In Windows, we can use dir command to get the file size.

Download 10 Mb File

But there is no option/switch to print only the file size.

Get size for all the files in a directory

Dir command accepts wild cards. We can use ‘*” to get the file sizes for all the files in a directory.

We can also get size for files of certain type. For example, to get file size for mp3 files, we can run the command ‘dir *.mp3‘.

Download 10 mb file

The above command prints file modified time also. To print only the file name and size we can run the below command from a batch file.

Windows 10 file explorer show size in mb

Save the above commands to a text file, say filesize.bat, and run it from command prompt.

Conversion

Get directory size

Windows 10 Show File Size In Mb

There’s no Windows built in command to find directory size. But there is a tool called diruse.exe which can be used to get folder size. This tool is part of XP support tools. This command can be used to get directory size. This command’s syntax is given below.

Windows 10 Show File Size In Mb Gb

As you can see in the above example, diruse prints the directory size in bytes and it also prints the number of files in the directory(it counts the number of files in the sub folders also)

To get the directory size in mega bytes we can add /M switch.

Though the tool is intended for XP and Server 2003, I have observed that it works on Windows 7 also. The above examples were indeed from a Windows 7 computer.

In Windows, if one wants to find which files are consuming most of the space on the disk, it can be found easily using explorer. Just sort list of the files based on the size attribute. But what if we need to find the large sized files from command line? How can we do this?

Windows 10 Show File Size In Mb

Show File Extensions

We can find this using windows commands, without needing any third party tools. We can do this using forfiles command.

Find files with size of 1 MB or more.

Example:

This command prints the complete file path. If you need to print just the file name, you can use @file in place of @path.

Command to find files with size of more than 100MB

Find files with size 1 GB or more.

As shown above, this command allows us to find files having size more than a given value. It’s not useful if someone wants to find the largest 10 files in a folder. I could not find a way to do this using windows native commands. If you know of any way to do this, please let others know by adding comment below.