Batchography: Converting numbers to characters (or the CHR() function)

In various programming languages, you might sometimes need to convert numbers to characters. In simple terms, each character you see has a numerical representation. The ASCII table  shows the numbers of each character and its corresponding glyph.

Converting numbers to their corresponding characters would be useful to generate a random string for instance. The first step to generating a random string is to generate random numbers between 65 and 90 (upper case ‘A’ to upper case ‘Z’) or between 97 and 122 (lower case ‘a’ to lower case ‘z’).

While the Batch language is pretty primitive, you would be surprised how many things you can do with it. In the Batchography book, I cover various topics that would bring your Batch programming skills to the next level.

Get the book from Amazon:

  • Paperback editionbtn-buy-on-amazon
  • E-book editionbtn-buy-on-amazon

flower separator Continue reading

Change hard disk volume serial number

A few years ago, I wrote an article explaining how to change the volume serial number.

Volume Serial Number Changer

This program does not work properly now under Windows Vista or Windows 7 unless executed as administrator. Following many suggestions, I updated the tool to support the latest Windows version.

Please note that after you change the serial number you may need to reboot the PC for the settings to take effect.


Note: You may need to download and install the Microsoft Visual C++ 2010 Redistributable Package (x86).