Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • June 25, 2017, 05:42:36 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Use Batch Script to create an acronym from a variable  (Read 452 times)


  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 524
    • View Profile
    • Donate to Member
Use Batch Script to create an acronym from a variable
« on: October 31, 2016, 05:34:39 PM »
The Variable is made up of one or more words separated by spaces.

The resulting acronym cannot be more than 8 characters in length and must contain at least the first letter from each word in the input.

If the Input was "president" the output would be "presiden" not just the letter "p". 
If the input was "president and chairperson" the output would be "pranch".

If the input was "chief cook and bottle washer" the acronym would be "ccabw" but
if the input was "cook and bottle washer"  the acronym would be coanbowa.

Is there a relatively simple way to accomplish this using a for/to loop?