Here’s two articles related with the topic – How to extract a part of a variable, and How to substitute / replace a part of it, by using ‘set’ command in Windows XP command prompt.
(will appear in new window)
Copyright SS64.com 1999-2012
It is possible to retrieve specific characters from a string variable.
Use the syntax below to edit and replace the characters assigned to a string variable.
This Edit/Replace syntax can be used anywhere that you would use the %variable% such as ECHOing the variable to screen or setting one variable = another