I want to know if there is a way to limit the number of characters on an input variable within a .bat file. Using the %1 command to read in a variable, I want to limit this variable to 8 characters.
example: test.bat is the name of the bat file and within the bat file there is the following command:
SET name=%1
c:\>test 123456789
I would like name to be equal to 12345678 rather than 123456789.
Any help is appreciated, thanks.