FileInfo Formatting - Display size in raw bytes versus units

Topics: Developer Forum
Coordinator
Dec 26, 2006 at 6:47 AM
I would like to see the default dir listing format go back to displaying raw bytes rather than units. We could make a bool preference variable for this to turn on units display? Thoughts?

BTW I can much easier do a quick compare of files when I see the complete size. With the units you lose precision/significant digits.
Developer
Dec 26, 2006 at 10:21 AM
yeah, I was considering this from beginning. I am just not sure whether to implement it in the cmdlet or as a wrapper function
Coordinator
Dec 27, 2006 at 3:43 AM
Isn't this dictated by your FileSystem.ps1xml file? You'd have to update your script blocks to test for the existence (Test-Path variable:PscxFileSizeInUnitsPreference) and then obey that value if it exists. If it doens't then don't use units i.e. format-byte.
Developer
Dec 27, 2006 at 3:54 AM
ok, i'll wrap the format-byte call in an if()
Developer
Dec 31, 2006 at 1:20 AM
This discussion has been copied to Work Item 6917. You may wish to continue further discussion there.