Oh, this is due to the time format problem. The last two characters are in milliseconds, which is not needed by ordinary people. The format is a bit more than a few minutes or seconds, therefore, this is used to remove the last three characters. The first 0 indicates that the offset is 0, that is, to take the first character. Starting from the first character,-3 indicates that the last three characters are removed. The previous 0 can also be omitted here. I understand. I don't know if I have made a mistake. I don't know if you have understood this much. I can search for such posts on the Forum, and lxmxn also wrote such posts, as well as batch processing. Be sure to take a good look when you are free.
From set /? Extracted help:
% PATH :~ 10, 5%
The PATH environment variables will be extended, and then only 11th (partial
10 characters. If no length is specified, the default value is used.
Value, that is, the remainder of the variable value. If both numbers (offset and length) are negative,
The number used is the length of the environmental variable value plus the specified offset or length.
% PATH :~ -10%
Extracts the last 10 characters of the PATH variable.
% PATH :~ 0,-2%.
All characters in the PATH variable, except the last two.
Example:
D: \> echo % time %
22:41:02. 15
D: \> echo % time :~ -3%
. 77
D: \> echo % time :~ 0,-3%.
22:41:19
D: \> echo % time :~, -3%
22:41:26
D: \> echo % time :~ 0, 2%
22
D: \> set a = 12345678
D: \> echo % :~ -5:-1%
4567
D: \> echo % :~ -5:-2%
456
D: \> echo % :~ -5:-5%
ECHO is on.
D: \> echo % :~ -5:-6%
ECHO is on.
D: \> echo % :~ -5:-4%
4