PDA

View Full Version : Increment Value within a Text File


remmie
01-31-2006, 11:12 AM
I would like to open the file, increment the values then close it.

Test.txt
Input:


/*
Some Comment
*/

#define BUILDNUM 1111
#define VERSION "5.06.0.1111"


Expected Output:


/*
Some Comment
*/

#define BUILDNUM 1112
#define VERSION "5.06.0.1112



Thanks alot, I have looked at many of the other examples but could not get them to work in this way.

kinook
01-31-2006, 05:26 PM
Attached is one way (v6 project file).

remmie
02-01-2006, 10:32 AM
Thank you, for providing such fast support.

That worked perfectly.