How would I go about changing the destl variable to uppercase before it is used. I assume some sort of character swap, however I couldn\'t get it working. C
This is probably the fastest way to convert string to upper case using batch file - it uses a macro ,it stores only the upper case letters in the loop using the way of how batch replaces strings and stores the produced string in a variable called result
:
@echo off
set UpperCaseMacro=for /L %%n in (1 1 2) do if %%n==2 (for %%# in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do set "result=!result:%%#=%%#!") else setlocal enableDelayedExpansion ^& set result=
set "string=SOme STrinG WiTH lowerCAse letterS and UPCase leTTErs"
%UpperCaseMacro%%string%
echo %result%