Quantcast
Viewing all articles
Browse latest Browse all 9637

Formatting numbers in .bat files

In a .bat file, I echo strings containing large numerical data (representing bytes of a Storage Space, i.e. non-negative big integers), e.g.:

"   123456789012345"

I'd like to format these numbers for better readability, but unfortunately, I am not able to find any kind of Format function for use within .bat files.

My desired output would be:

"    123,456,789,012,345"

Is there an awkwardly named Format function I am not aware of? If not, is there a best practice function to format such numbers, possibly involving the For statement? (If neither, does no-one but me want to format numbers?)


Viewing all articles
Browse latest Browse all 9637

Trending Articles