I want to split a string in two parts, without using any for loop.
For example, I have the string in a variable:
str=45:abc
I want
Yes, I know this is a very old topic, but I just discovered it and I can't resist the temptation of post my solution:
@echo off setlocal set "str=45:abc" set "var1=%str::=" & set "var2=%" echo var1="%var1%" var2="%var2%"
You may read full details of this method here.