Trying to make my batch compatible across various windows versions including Windows NT.
I need to return the last character of a variable. Normally I would use %foo:~-1% to return although this does not work on Windows NT.
I have read WinNT version of set /? to no avail.
Using %foo:~x,1% where x is the position of last character won't work for me as the variable length will change.
I thought of running a script to check str length with one of many methods, then running !foo:~%x%,1! but to my knowledge the reason I cant get this to work is lack of delayed expansion in WinNT and a lot of coding for something I'm hoping to be a simple fix.
Any ideas how to tackle this?
Thanks