Bat: receive nr. from txt and set as %con%

Toshiba / Satellite a200
September 14, 2010 at 03:46:57
Specs: Microsoft Windows Vista Home Premium, 1.667 GHz / 2045 MB
I want my bat file to get a serie of numbers out of a txt file (version.txt)
and the set it as %con%
i have made a little bat file already but closes at a certain moment
this is the bat file:
SetLocal EnableDelayedExpansion
set con=
for /F "delims=" %%i in (version.txt) do set content=!content! %%i
////////////////////// After this point it just closes itself /////////////////////
%content% | find "Current version:" | find /c " 0.0.0"

And this is version.txt
Current version: [0.5.6]

i want it to receive "0.5.6"
and set it as %con%

Thanks, Rediwed

See More: Bat: receive nr. from txt and set as %con%

Report •

September 14, 2010 at 04:35:17
Well, you need to echo it... The script thinks that you are using it as a command, which it doesn't recognize.


FOR /f "tokens=3 delims= " %%a IN (version.txt) DO (
	SET con=%%a

Can I put a question here?

Report •

September 14, 2010 at 06:18:19
Can this work with a online file?

Report •

Related Solutions

Ask Question