simple case question

  • Thread starter Thread starter Kris
  • Start date Start date
K

Kris

Is there a way that I could add to a batch file to UCASE a
certain variable? for example I have a batch file that is

test.bat Arg1

I want to make sure that no matter what a user types for %
1 that it is converted to upper case, like the basic UCASE
()

thanks
 
One other solution is use vbscript to convert (given WSH is available).
Dirty but short...

===================
Echo Wscript.Echo ucase("%1")>%TEMP%\$ucase.vbs
for /f %%I in ('cscript %TEMP%\$ucase.vbs //noLogo') do Echo %%I
del %TEMP%\$ucase.vbs
===================

Gurgen.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top