DOS batch command to read some info from text file

Posted by Ray on Stack Overflow See other posts from Stack Overflow or by Ray
Published on 2010-04-02T23:01:53Z Indexed on 2010/04/02 23:13 UTC
Read the original article Hit count: 357

Filed under:
|
|

Hello All,

I am trying to read some info from a text file by using windows command line, and save it to a variable just like "set info =1234"

Below is the content of the txt file, actually I just need the revision number, and the location of it is always the same line 5, and from column 11 to 15. In the sample it's 1234, and I am wondering is there a way to save it to a variable in Dos command line.

Thanks a lot!

svninfo.txt:

Path: .
URL: https://www.abc.com
Repository Root: https://www.abc.com/svn
Repository UUID: 12345678-8b61-fa43-97dc-123456789
Revision: 1234
Node Kind: directory
Schedule: normal
Last Changed Author: abc
Last Changed Rev: 1234
Last Changed Date: 2010-04-01 18:19:54 -0700 (Thu, 01 Apr 2010)

© Stack Overflow or respective owner

Related posts about command-line

Related posts about dos