FOR 輸出時被空白截斷

因為FOR指令預設分隔符號是空白和Tab,故需複寫。
@ECHO OFF
FOR /f "delims=" %%a in ('DIR *.txt /b') DO ECHO %%a
PAUSE

dos - batch file for loop with spaces in dir name - Stack Overflow