If I understand correctly, the best way to do this will be to select a substring of the username. This can be done like so:
This will select the first seven characters of the username. If you ever need to truncate in a different way, the first number (0) is the start position of the substring, and the second number (7) is the number of characters to select.
As EBGreen pointed out, there are other scripting languages besides batch. If you're using Powershell, the syntax would be:
If you're using VBScript, the syntax would be:
WScript.Echo Left(CreateObject("WScript.Shell").ExpandEnvironmentStrings("%USERNAME%"), 7)