Jump to content

Exclude 0 byte files


Disk4mat

Recommended Posts

Even though the file indicates that it has 0 bytes it still takes up one 512 byte block on the hard drive as that is the nature of how files are stored there.

"Education is what remains after one has forgotten everything he learned in school." - Albert Einstein

IE7Pro user

Link to comment
Share on other sites

  • 2 weeks later...

If I launch Notepad I can immediately save a file which holds nothing.

 

File properties shows it to be 0 bytes, and the size on disc is 0

 

Immediately I add a solitary character to this file, properties shows Size 1 byte, Size on disk 4 KB - the size of my clusters.

 

I suspect that Yokenny has a cluster size of 512 bytes.

 

The "size" of the file only determines how many clusters are needed to hold it.

Any size greater than zero will consume at least one cluster.

 

n.b. How does Windows Explorer tell me when I created this Null.txt file, and what its name is ?

I suspect that this is data planted in the MFT (or the FAT depending upon O.S),

AND that this data consumes yet another cluster, even when the file it describes is zero bytes long.

 

I do not think it useful to set a specific size as a limit,

AND most users will NOT look at file properties

- they will simply see a DIR listing showing a file size of 1 byte (or how many characters I typed),

and users who do not appreciate the difference from "Size on Disk" may soon start posting bug reports !!!

 

Regards

Alan

Link to comment
Share on other sites

I suspect that Yokenny has a cluster size of 512 bytes.

Just about all you need to know about clusters, sectors and File Systems:

http://books.google.ca/books?id=9vfQKUT_Bj...3&ct=result

"Education is what remains after one has forgotten everything he learned in school." - Albert Einstein

IE7Pro user

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.