DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Lowercasing A String In BAT Files

08.05.2005
| 13480 views |
  • submit to reddit
        Using <a href=http://www.bigbold.com/snippets/posts/show/553>this silliness</a>, here's an example of BAT file that will
lower-case a string given as an argument.

echo>%1
dir /b/l %1>lower.tmp
set /p result=<lower.tmp
echo %result%

Saving this as lower.bat, I run 

lower "HELLO WORLD"

and get 

hello world

as a result