So I wanted my cmd to select random sentences.
set /a rnd=%random%%%5
for /f "tokens=1,2" %%a in (list.txt) do if %rnd%==%%a echo %%b
Im using this but inside the list.txt file I have sentences with spaces. For some reason cmd only shows the first word and it doesnt with the rest.
For example a sentence in the file.
Hello how are you?
This would show as
Hello and that's all.
But if I type it like this
Hello_how_are_you?
then it does show all the words but it does include all the _'s
Any idea how to make the spaces show without replacing them with signs?
"tokens=1*"thenawill hold the first field, andbwill hold the rest of the line.