I need to separate a string based on spaces, but only after the first space. However, the second string returns only one word.
The code I'm currently using is this:
@echo off set string=alone these are together for /f "tokens=1 " %%g IN ("%string%") do set first=%%g for /f "tokens=2*" %%g IN ("%string%") do set second=%%g echo %first% echo %second% pause Right now, my output is alone these, but I want alone these are together.
Am I setting the variable wrong, or is my sytax on the token option incorrect?