Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Do you know any file size info & calculation tools?

Featured Replies

Posted

Hi guys,

I was looking for an complete file size calculation / info display GUI tool where I could drag & drop any file/s into (and also manually entering values) to get all size information's of it from bites till petabytes etc. I just can find online tools like this nice one...

https://www.superfile.ai/productivity-tools/file-size-calculator

...what does display all. Something like this only as tool not online or better some kind of calculation tool what has another more calc features. Is there any you could recommend? Any tool on Github etc or has Windows already some tool what can do that?

greetz

Hi,

Your referred online tool is not perfect (2^10 != 1000) :|

Made a simple tool for you (source in delphi/pascal included).

ShowFileSize.rar

  • Author

Hey @h4sh3m,

thank you for doing this. The tool looks nice and handy so far for a quick offline use. :) 🙂 Only issue I see it that comma or dot is not allowed to use to enter manually "Error occured in getting number !". Do you think you could add this little extra feature too in next version? I would like to copy any of those results I get and paste it into edit control and calc with just for checking etc. But for the moment the tool is nice so far. Just does bother me to get online every time I need to calc something. Thank you.

PS: Drag & Drop works also nice. Could you make it doable for multiple files too to add the sizes into result box? Just if possible.

greetz

Hi,

Added multi file support and replaced float input with integer :)

source included as before.

ShowFileSize__2.rar

1st bug report: (ver 2)

image.png

one more (feature req or bug?)

when drag-n-drop a Folder

the app accepts it, but does nothing...

possible to calc folder as well?

Is this of any use TreeSize?

17 hours ago, LCF-AT said:

Hi guys,

I was looking for an complete file size calculation / info display GUI tool where I could drag & drop any file/s into (and also manually entering values) to get all size information's of it from bites till petabytes etc. I just can find online tools like this nice one...

https://www.superfile.ai/productivity-tools/file-size-calculator

...what does display all. Something like this only as tool not online or better some kind of calculation tool what has another more calc features. Is there any you could recommend? Any tool on Github etc or has Windows already some tool what can do that?

greetz

Something like this output?

File: WinAPP.exe

File Size Breakdown:

Bytes (B): 104448.00 (1 Byte = 8 bits)

Kilobytes (KB): 102.00 (1 KB = 1024 Bytes)

Megabytes (MB): 0.10 (1 MB = 1024 KB = 1,048,576 Bytes)

Gigabytes (GB): 0.00 (1 GB = 1024 MB = 1,073,741,824 Bytes)

Terabytes (TB): 0.00 (1 TB = 1024 GB = 1,099,511,627,776 Bytes)

Petabytes (PB): 0.00 (1 PB = 1024 TB = 1,125,899,906,842,624 Bytes)

No image preview

pic — Postimages

Hmmm... Inline code option seems not to work correctly. See attached code.

code.cs

Edited by Stuttered

29 minutes ago, Stuttered said:

Something like this output?

File: WinAPP.exe

File Size Breakdown:

Bytes (B): 104448.00 (1 Byte = 8 bits)

Kilobytes (KB): 102.00 (1 KB = 1024 Bytes)

Megabytes (MB): 0.10 (1 MB = 1024 KB = 1,048,576 Bytes)

Gigabytes (GB): 0.00 (1 GB = 1024 MB = 1,073,741,824 Bytes)

Terabytes (TB): 0.00 (1 TB = 1024 GB = 1,099,511,627,776 Bytes)

Petabytes (PB): 0.00 (1 PB = 1024 TB = 1,125,899,906,842,624 Bytes)

No image preview

pic — Postimages

Here is the code:

using System;

using System.IO;

using System.Windows.Forms;

namespace FileSizeCalculator

{

public partial class Form1 : Form

{

private TextBox outputTextBox;

public Form1(string filePath = null)

{

// Set form properties

this.Text = "File Size Calculator";

this.Size = new System.Drawing.Size(400, 350);

this.AllowDrop = true;

this.DragEnter += Form1_DragEnter;

this.DragDrop += Form1_DragDrop;

// Create a label for instructions

Label instructionLabel = new Label

{

Text = "Drag and drop a PE file here or onto the desktop icon.",

AutoSize = true,

Location = new System.Drawing.Point(10, 10)

};

this.Controls.Add(instructionLabel);

// Create a multiline TextBox for output

outputTextBox = new TextBox

{

Multiline = true,

ReadOnly = true,

ScrollBars = ScrollBars.Vertical,

Location = new System.Drawing.Point(10, 40),

Size = new System.Drawing.Size(360, 250)

};

this.Controls.Add(outputTextBox);

// Process file if provided via command-line (desktop icon drop)

if (!string.IsNullOrEmpty(filePath))

{

ProcessFile(filePath);

}

}

private void Form1_DragEnter(object sender, DragEventArgs e)

{

if (e.Data.GetDataPresent(DataFormats.FileDrop))

{

e.Effect = DragDropEffects.Copy;

}

}

private void Form1_DragDrop(object sender, DragEventArgs e)

{

string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);

if (files.Length > 0)

{

ProcessFile(files[0]);

}

}

private void ProcessFile(string path)

{

outputTextBox.Text = string.Empty;

if (!File.Exists(path))

{

outputTextBox.Text = "File not found.";

return;

}

// Check if it's a PE file (starts with 'MZ')

bool isPE = false;

try

{

using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read))

{

byte[] header = new byte[2];

if (fs.Read(header, 0, 2) 2 && header[0] 77 && header[1] == 90) // 'M' and 'Z'

{

isPE = true;

}

}

}

catch (Exception ex)

{

outputTextBox.Text = $"Error reading file: {ex.Message}";

return;

}

if (!isPE)

{

outputTextBox.Text = "The dropped file is not a valid PE (Portable Executable) file.";

return;

}

FileInfo fi = new FileInfo(path);

long sizeInBytes = fi.Length;

// Units and descriptions (binary prefixes: 1024-based)

var units = new[]

{

new { Name = "Bytes (B)", Description = "1 Byte = 8 bits", Divisor = 1.0 },

new { Name = "Kilobytes (KB)", Description = "1 KB = 1024 Bytes", Divisor = Math.Pow(1024, 1) },

new { Name = "Megabytes (MB)", Description = "1 MB = 1024 KB = 1,048,576 Bytes", Divisor = Math.Pow(1024, 2) },

new { Name = "Gigabytes (GB)", Description = "1 GB = 1024 MB = 1,073,741,824 Bytes", Divisor = Math.Pow(1024, 3) },

new { Name = "Terabytes (TB)", Description = "1 TB = 1024 GB = 1,099,511,627,776 Bytes", Divisor = Math.Pow(1024, 4) },

new { Name = "Petabytes (PB)", Description = "1 PB = 1024 TB = 1,125,899,906,842,624 Bytes", Divisor = Math.Pow(1024, 5) }

};

string output = $"File: {Path.GetFileName(path)}\r\n\r\nFile Size Breakdown:\r\n";

foreach (var unit in units)

{

double sizeInUnit = sizeInBytes / unit.Divisor;

output += $"{unit.Name}: {sizeInUnit:F2} ({unit.Description})\r\n";

}

outputTextBox.Text = output;

}

}

static class Program

{

[STAThread]

static void Main(string[] args)

{

Application.EnableVisualStyles();

Application.SetCompatibleTextRenderingDefault(false);

string filePath = args.Length > 0 ? args[0] : null;

Application.Run(new Form1(filePath));

}

}

}

what's the problem using code sections?

eg

using System;

using System.IO;

using System.Windows.Forms;

namespace FileSizeCalculator

{

public partial class Form1 : Form

{

private TextBox outputTextBox;

....

But generally I agree - in the past there were more options to insert source code....

@Teddy Rogers it is a limitation of new upgraded forum board?

1 hour ago, Stuttered said:

// Check if it's a PE file (starts with 'MZ')

hmmm why do you need to do that check? the orignal idea was to measure any file in size...

1 hour ago, jackyjask said:

what's the problem using code sections?

eg

using System;

using System.IO;

using System.Windows.Forms;

namespace FileSizeCalculator

{

public partial class Form1 : Form

{

private TextBox outputTextBox;

....

But generally I agree - in the past there were more options to insert source code....

@Teddy Rogers it is a limitation of new upgraded forum board?

hmmm why do you need to do that check? the orignal idea was to measure any file in size...

I tried using the inline code option and didn't seem to work. Can you reply back if you know the tags I can just insert myself?

  • Author

Hi guys,

thanks for feedback so far. @h4sh3m Thanks for version 2 but its still buggy. If I enter 2 & GB I get this results...

Bit: 17179869184

Byte: 2147483648

KB: 2.097.152,000000000000000

MB: 2.048,000000000000000

GB: 2,000000000000000

TB: 0,001953125000000

PB: 0,000001907348633

...and if I copy & paste the GB results or just enter 2,0 I get this...

Bit: 171798691840

Byte: 21474836480

KB: 20.971.520,000000000000000

MB: 20.480,000000000000000

GB: 20,000000000000000

TB: 0,019531250000000

PB: 0,000019073486328

...whats not so correct. 🙂 @Stuttered Yes similar like or the website like I did post. In your image the results looking very unclean to have a good overview. Even I need to have some manually entering option.

So normally there are apps for everything so why the heck I don't find any tool for this calc stuff? One more question, so I always find sometimes those online tools to convert stuff or whatever etc, some nice handy tools but just online only. Is it possible to save that webpage and make some kind of standalone quick loading app etc?

PS: Why are the code in code tags (inline?) looks so strange now / too much space between the lines? I also don't see any preview button anymore on that new style!

greetz

2 hours ago, LCF-AT said:

Hi guys,

thanks for feedback so far. @h4sh3m Thanks for version 2 but its still buggy. If I enter 2 & GB I get this results...

Bit: 17179869184

Byte: 2147483648

KB: 2.097.152,000000000000000

MB: 2.048,000000000000000

GB: 2,000000000000000

TB: 0,001953125000000

PB: 0,000001907348633

...and if I copy & paste the GB results or just enter 2,0 I get this...

Bit: 171798691840

Byte: 21474836480

KB: 20.971.520,000000000000000

MB: 20.480,000000000000000

GB: 20,000000000000000

TB: 0,019531250000000

PB: 0,000019073486328

...whats not so correct. 🙂 @Stuttered Yes similar like or the website like I did post. In your image the results looking very unclean to have a good overview. Even I need to have some manually entering option.

So normally there are apps for everything so why the heck I don't find any tool for this calc stuff? One more question, so I always find sometimes those online tools to convert stuff or whatever etc, some nice handy tools but just online only. Is it possible to save that webpage and make some kind of standalone quick loading app etc?

PS: Why are the code in code tags (inline?) looks so strange now / too much space between the lines? I also don't see any preview button anymore on that new style!

greetz

Latest attempt to get as close to the web site as possible. See attached PE and SRC.

No image preview

pic — Postimages

No image preview

pic2 — Postimages

FileSizeCalc.rar

Edited by Stuttered

@Stuttered

bug report

image.png

  • Author

@Stuttered Thank you for the new tool version. Now it looks better and I can use the comma to enter more precise values.Drag & Drop works too but only for single files. All in all you both made a nice tool so far I can use offline. 🙂 I'm really not into Math at all and never was! 🙃

greetz

1 hour ago, LCF-AT said:

@Stuttered Thank you for the new tool version. Now it looks better and I can use the comma to enter more precise values.Drag & Drop works too but only for single files. All in all you both made a nice tool so far I can use offline. 🙂 I'm really not into Math at all and never was! 🙃

greetz

You are welcome. It was a good exercise!

v0.0.3 is attached with SRC (minor bug fix).

FileSizeCalc_v0.0.3.rar

  • Author

Thanks again @Stuttered but your 0.3 version is not working correctly anymore. Just enter 2,45 & GB and its showing 245 GB.

Cals_2025-08-26.jpg

You see? By the way, could you add VK_return command or better check the edit control on fly and print the results if I enter anything right away (or change format) like the website does too. Don't wanna move the mouse every time so far away and click on calc button if I play with different values etc. Could you also increase the font size in results window? Maybe like in Notepad using font size 11. Just if possible you know. Thanks.

greetz

5 hours ago, Stuttered said:

v0.0.3 is attached with SRC (minor bug fix).

the bug with negative values is still present...

just fill in big enough number

Hi again,

  • fixed negative numbers bug (or I think that it is fixed 😅)

  • fixed thousand delimiter bug (I hope its work in your system 🤞)

  • added support directories 🤓

  • source included as before 👇

ShowFileSize__3.rar

Thanks!

fresh bug reports :)

image.png

another one - number is small and is positive!

image.png

and one more

image.png

problems with precision - info lost asfter some sign...

image.png

21 minutes ago, h4sh3m said:

added support directories 🤓

it walks inly 1 level inside folder?

what if I've much more deeper subfolder structure?

The tool hangs if you try to drop C:\Windows dir :)

image.png

@Stuttered the formatting using Code Blocks seems to be working okay here...

using System;
using System.IO;
using System.Windows.Forms;

namespace FileSizeCalculator
{
    public partial class Form1 : Form
    {
        private TextBox outputTextBox;

        public Form1(string filePath = null)
        {
            // Set form properties
            this.Text = "File Size Calculator";
            this.Size = new System.Drawing.Size(400, 350);
            this.AllowDrop = true;
            this.DragEnter += Form1_DragEnter;
            this.DragDrop += Form1_DragDrop;

            // Create a label for instructions
            Label instructionLabel = new Label
            {
                Text = "Drag and drop a PE file here or onto the desktop icon.",
                AutoSize = true,
                Location = new System.Drawing.Point(10, 10)
            };
            this.Controls.Add(instructionLabel);

            // Create a multiline TextBox for output
            outputTextBox = new TextBox
            {
                Multiline = true,
                ReadOnly = true,
                ScrollBars = ScrollBars.Vertical,
                Location = new System.Drawing.Point(10, 40),
                Size = new System.Drawing.Size(360, 250)
            };
            this.Controls.Add(outputTextBox);

            // Process file if provided via command-line (desktop icon drop)
            if (!string.IsNullOrEmpty(filePath))
            {
                ProcessFile(filePath);
            }
        }

        private void Form1_DragEnter(object sender, DragEventArgs e)
        {
            if (e.Data.GetDataPresent(DataFormats.FileDrop))
            {
                e.Effect = DragDropEffects.Copy;
            }
        }

        private void Form1_DragDrop(object sender, DragEventArgs e)
        {
            string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
            if (files.Length > 0)
            {
                ProcessFile(files[0]);
            }
        }

        private void ProcessFile(string path)
        {
            outputTextBox.Text = string.Empty;

            if (!File.Exists(path))
            {
                outputTextBox.Text = "File not found.";
                return;
            }

            // Check if it's a PE file (starts with 'MZ')
            bool isPE = false;
            try
            {
                using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read))
                {
                    byte[] header = new byte[2];
                    if (fs.Read(header, 0, 2) == 2 && header[0] == 77 && header[1] == 90) // 'M' and 'Z'
                    {
                        isPE = true;
                    }
                }
            }
            catch (Exception ex)
            {
                outputTextBox.Text = $"Error reading file: {ex.Message}";
                return;
            }

            if (!isPE)
            {
                outputTextBox.Text = "The dropped file is not a valid PE (Portable Executable) file.";
                return;
            }

            FileInfo fi = new FileInfo(path);
            long sizeInBytes = fi.Length;

            // Units and descriptions (binary prefixes: 1024-based)
            var units = new[]
            {
                new { Name = "Bytes (B)", Description = "1 Byte = 8 bits", Divisor = 1.0 },
                new { Name = "Kilobytes (KB)", Description = "1 KB = 1024 Bytes", Divisor = Math.Pow(1024, 1) },
                new { Name = "Megabytes (MB)", Description = "1 MB = 1024 KB = 1,048,576 Bytes", Divisor = Math.Pow(1024, 2) },
                new { Name = "Gigabytes (GB)", Description = "1 GB = 1024 MB = 1,073,741,824 Bytes", Divisor = Math.Pow(1024, 3) },
                new { Name = "Terabytes (TB)", Description = "1 TB = 1024 GB = 1,099,511,627,776 Bytes", Divisor = Math.Pow(1024, 4) },
                new { Name = "Petabytes (PB)", Description = "1 PB = 1024 TB = 1,125,899,906,842,624 Bytes", Divisor = Math.Pow(1024, 5) }
            };

            string output = $"File: {Path.GetFileName(path)}\r\n\r\nFile Size Breakdown:\r\n";
            foreach (var unit in units)
            {
                double sizeInUnit = sizeInBytes / unit.Divisor;
                output += $"{unit.Name}: {sizeInUnit:F2} ({unit.Description})\r\n";
            }

            outputTextBox.Text = output;
        }
    }

    static class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            string filePath = args.Length > 0 ? args[0] : null;
            Application.Run(new Form1(filePath));
        }
    }
}

Ted.

9 hours ago, jackyjask said:

the bug with negative values is still present...

just fill in big enough number

You're getting this error? Please enter a valid positive number for the file size.

Update: I think I found this...

Edited by Stuttered

Okay, here is a TEST version. I had to change the code to handle Big Number calculations, which sucked. See attached (if I can get this to work, I'll look at other requests by LFC-AT).

FileSizeCALC_TST.rar

  • Author

Hey guy's and thanks so far again for the new versions. I have checked both latest tools.

@Stuttered @h4sh3m Good thing is you made the font larger I can see better now. Bad thing is that you removed to the ability to enter values with a comma manually but I can paste anything. I also get mixed results back with comma & dots in both of your tools. If I enter 2.5 GB in your tool I get this back...

File Size Breakdown (Binary (1024-based)):

Unit Size Description

------------ ------------------------ --------------------------------

Bits 21,474,836,480 1 Bit = 1/8 Byte

Bytes 2,684,354,560 1 Byte = 8 Bits

Kilobytes 2,621,440 1 KB = 1024 Bytes

Megabytes 2,560 1 MB = 1024 KB

Gigabytes 2.5 1 GB = 1024 MB

Terabytes 0.00244 1 TB = 1024 GB

Petabytes 0.00000238 1 PB = 1024 TB

...so I think it should show 2,5 GB and 2.560 MB. Just using a DOT after 3 digits and Comma for real value information etc right? Not so sure about it too. 🙂 In case of using the tool from @h4sh3m I get this...

Bit: 21474836480

Byte: 2684354560

KB: 2.621.440,000000000000000

MB: 2.560,000000000000000

GB: 2,500000000000000

TB: 0,002441406250000

PB: 0,000002384185791

...which looks differently. But both tools can't handle multiple dragged files to add calc sizes and enter button still not doing anything (optional) or doing some EN_CHANGE handle on fly (optional).

greetz

53 minutes ago, LCF-AT said:

Hey guy's and thanks so far again for the new versions. I have checked both latest tools.

@Stuttered @h4sh3m Good thing is you made the font larger I can see better now. Bad thing is that you removed to the ability to enter values with a comma manually but I can paste anything. I also get mixed results back with comma & dots in both of your tools. If I enter 2.5 GB in your tool I get this back...

File Size Breakdown (Binary (1024-based)):

Unit Size Description

------------ ------------------------ --------------------------------

Bits 21,474,836,480 1 Bit = 1/8 Byte

Bytes 2,684,354,560 1 Byte = 8 Bits

Kilobytes 2,621,440 1 KB = 1024 Bytes

Megabytes 2,560 1 MB = 1024 KB

Gigabytes 2.5 1 GB = 1024 MB

Terabytes 0.00244 1 TB = 1024 GB

Petabytes 0.00000238 1 PB = 1024 TB

...so I think it should show 2,5 GB and 2.560 MB. Just using a DOT after 3 digits and Comma for real value information etc right? Not so sure about it too. 🙂 In case of using the tool from @h4sh3m I get this...

Bit: 21474836480

Byte: 2684354560

KB: 2.621.440,000000000000000

MB: 2.560,000000000000000

GB: 2,500000000000000

TB: 0,002441406250000

PB: 0,000002384185791

...which looks differently. But both tools can't handle multiple dragged files to add calc sizes and enter button still not doing anything (optional) or doing some EN_CHANGE handle on fly (optional).

greetz

This could be because the web site tool does not allow "," only ".". (so I don't) That is how it works for me, at least. I must have messed up a revision to allow periods. - argh. That could change things. I'll take a look see in a bit.

1 hour ago, LCF-AT said:

Hey guy's and thanks so far again for the new versions. I have checked both latest tools.

@Stuttered @h4sh3m Good thing is you made the font larger I can see better now. Bad thing is that you removed to the ability to enter values with a comma manually but I can paste anything. I also get mixed results back with comma & dots in both of your tools. If I enter 2.5 GB in your tool I get this back...

File Size Breakdown (Binary (1024-based)):

Unit Size Description

------------ ------------------------ --------------------------------

Bits 21,474,836,480 1 Bit = 1/8 Byte

Bytes 2,684,354,560 1 Byte = 8 Bits

Kilobytes 2,621,440 1 KB = 1024 Bytes

Megabytes 2,560 1 MB = 1024 KB

Gigabytes 2.5 1 GB = 1024 MB

Terabytes 0.00244 1 TB = 1024 GB

Petabytes 0.00000238 1 PB = 1024 TB

...so I think it should show 2,5 GB and 2.560 MB. Just using a DOT after 3 digits and Comma for real value information etc right? Not so sure about it too. 🙂 In case of using the tool from @h4sh3m I get this...

Bit: 21474836480

Byte: 2684354560

KB: 2.621.440,000000000000000

MB: 2.560,000000000000000

GB: 2,500000000000000

TB: 0,002441406250000

PB: 0,000002384185791

...which looks differently. But both tools can't handle multiple dragged files to add calc sizes and enter button still not doing anything (optional) or doing some EN_CHANGE handle on fly (optional).

greetz

The code is getting increasing complex... Revision 0.0.4 attached.

FileSizeCALC_0.0.4.rar

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.