1.

Solve : How to get the first character of the argument?

Answer»

Hi All,


How to get the first character of command line argument from DOS Batch command?

Regards,
Arjun.Apparently only environment variables can be expanded and not command line variables. There is ALWAYS a way to do things in the bizzare WORLD of DOS.

Code: [Select]
set var=%1
set var=%var:~0,1%

Hope this helps.

PS. OS DEPENDENT: not Win9x



Discussion

No Comment Found