79794515

Date: 2025-10-19 22:48:22
Score: 1
Natty:
Report link

You need to add double quote around %1 to get the whole argument if it's a string.

@echo off  
:loop  
echo %1  
shift  
if "%~1" neq "" goto :loop

When you run it you will see the result like this:

D:\2\test2>arg1 abc "abc def"  
abc  
"abc def"
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ben Mar