'How to iterate all tokens with for in bat file?

This is my code:

set str=one.two.three.four
for /f "tokens=* delims=." %%a in ("%str%") do ECHO "%%a "

I want to iterate all tokens without delimiter, so, in the example I need to get one two three four. But I get "one.two.three.four ". Could anyone help me?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source