title: Get last character of a string from a variable Windows NT batch CMD
body: <p>Trying to make my batch compatible across various windows versions including Windows NT.</p>
  
  <p>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. </p>
  
  <p>I have read WinNT version of set /? to no avail.</p>
  
  <p>Using %foo:~x,1%  where x is the position of last character won't work for me as the variable length will change. </p>
  
  <p>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.</p>
  
  <p>Any ideas how to tackle this?</p>
  
  <p>Thanks</p>