I want to split the name of each folder (in a for loop) into 2 parts : the left part (before the delimiter " - ") and the right part (after the delimiter).
Example : "Bonjour - Cher ami" => left=Bonjour, right=Cher Ami
But it doesn't work :
for /d %%a in (*) do (
set "fname=%%a"
set "right=%fname:* - =%"
call set "left=%%fname: - %right%=%%"
echo [%left%] * [%right%]
)
Thanks in advance