Reputation: 159
Trying things out in my program and I encountered somethings. The 0 won't echo. Do you know the cause and solution?
@echo off cls SET x=0000 if %x:~-2%==00 ( set x=%x:~-2% ) echo %x% echo %x:~-1%
Upvotes: 1
Views: 23
Reputation: 41234
You are adding a trailing space before the closing bracket.
Upvotes: 3