This is the batch script I use to make the folders for a new client:
@ECHO OFF
SET /p clientLast=Enter Client\'s Last Name:
SET /p clientFirst=Enter Client\'s F
Or with pure batch...
@echo off
setlocal EnableDelayedExpansion
call :FirstUp result hello
echo !result!
call :FirstUp result abc
echo !result!
call :FirstUp result zynx
echo !result!
goto :eof
:FirstUp
setlocal EnableDelayedExpansion
set "temp=%~2"
set "helper=##AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ"
set "first=!helper:*%temp:~0,1%=!"
set "first=!first:~0,1!"
if "!first!"=="#" set "first=!temp:~0,1!"
set "temp=!first!!temp:~1!"
(
endlocal
set "result=%temp%"
goto :eof
)
The function :FirstUp use the trick of searching for the first character in the helper string with the %var:*x=% syntax.
This removes all chars before the first occurrence (therefore I double all chars) So, in first you got for the word "vox", "VWWXXYYZZ", then I simply take the first char of %first% to get the capital and append the rest of the original string without after the first char.