Duplicate:
Building on schnaader's answer, I think this does it if you want everything after %1 concatenated.
@echo off SHIFT set after1= :loop if "%1" == "" goto end set after1=%after1% %1 SHIFT goto loop :end echo %after1%