How to print Numbers to Words from batch file

Rajat Sehgal
Rajat Sehgal used Ask the Experts™
Hello Experts,

Using this batch how to print %sum1% in words along with numbers

@echo off
echo Enter a number:
set /p num1=  
set /a sum1="num1 * 100000"
echo The total is %sum1%
goto :Loop
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
rastoiWindows DTS expert

looking on your question, only one word comes to my mind: WHY ?
who might need this in batch nowadays?  But, probably someone here will have something like that saved.
Last time I was solving something similar, my batch was calling external vbs to do this :-)
IT / Software Engineering Consultant
Top Expert 2016
This would be very hard to do in pure DOS BAT commands, way past an effort I would do for a question answer.

If you really need something like this then I would suggest you find an implementation of this in VBS or Powershell, and then call that logic from your BAT script as needed to convert the number to a text version.  I've seen a number of these in my travels and even have a couple of VBS versions I played with...


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial