tags:

views:

321

answers:

1

Is there any command to convert from upper case to lower case. I would like to convert windows system variable %USERNAME% to lower case in a single command.I am not using NT. Thanks in advance

+1  A: 

I found this and this pages:

REM MS-DOS Version
SET STRING=Whatever You Want
SET OLDPATH=%PATH%
PATH %STRING%
SET STRING=%PATH%
PATH %OLDPATH%
SET OLDPATH=
ECHO.%STRING%

Or

REM NT Version
SET STRING=Whatever You Want
IF [%STRING%]==[] GOTO:EOF
SET STRING=%STRING:a=A%
SET STRING=%STRING:b=B%
•
•
•
SET STRING=%STRING:y=Y%
SET STRING=%STRING:z=Z%
SET STRING

Since I don't have an MS-DOS box here, I couldn't test it, sry.

Rubens Farias