Skip to content

Instantly share code, notes, and snippets.

@davidruhmann
Last active December 11, 2015 04:48
Show Gist options
  • Save davidruhmann/4547616 to your computer and use it in GitHub Desktop.
Save davidruhmann/4547616 to your computer and use it in GitHub Desktop.
[Batch] Remove the last token form a delimited string array (Tab used as example)
set "Var=%Var%@"
for /f "delims=" %%A in ('echo(%Var: =^&echo(%') do call set "Var2=%%Var: %%A=%%"
set "Var=%Var2%"
:: David Ruhmann
:: http://www.computerhope.com/forum/index.php/topic,135076.msg869228.html#msg869228
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment