I want to create a batch file that will read a txt file containing text similar to (it will all be on 1 line):
"http://schemas.google.com/g/2005#event"}],"title":{"$t":"Test Begins","type":"text"},"content":{"$t":"","type":"text"},"link":[{"rel":"alternate","type":"text/html","href":"http://www.google.com/calendar/event?eid=XzhkOWxjZ3JmZHByNmFzams2MWhtNGU5azY4c200cDfr45yxN65kYjE2cGhqNGMxbDY4cjNjZWIxYzhwamNlMzE2Z28wIGFkbWluQGJodWpkaGFtLm9yZw","title":"alternate"},{"rel":"self","type":"application/atom+xml","href":"http://www.google.com/calendar/feeds/admin%40test.org/public/full/_8d9lcgrfdpr6asjk61hm4e9k68sm4p336oq62db16phj4c1l63erceb1c8pjce316go0"}],"author":[{"name":{"$t":"admin@test.org"},"email":{"$t":"admin@test.org"}}],"gd$comments":{"gd$feedLink":{"href":"http://www.google.com/calendar/feeds/admin%40test.org/public/full/_8d9lcgrfdpr6asjk61hm4e9k68sm4p336oq62db16phj4c1l68r3ceb1c8pjce316go0/comments"}},"gd$eventStatus":{"value":"http://schemas.google.com/g/2005#event.confirmed"},"gd$where":[{"valueString":""}],"gd$who":[{"email":"admin@test.org","rel":"http://schemas.google.com/g/2005#event.organizer","valueString":"admin@test.org"}],"gd$when":[{"endTime":"2014-01-17","startTime":"2014-01-16"}],"gd$transparency":{"value":"http://schemas.google.com/g/2005#event.opaque"},"gCal$anyoneCanAddSelf":{"value":"false"},"gCal$guestsCanInviteOthers":{"value":"true"},"gCal$guestsCanModify":{"value":"false"},"gCal$guestsCanSeeGuests":{"value":"true"},"gCal$sequence":{"value":0},"gCal$uid":{"value":"CSVConvert0cb9429bdc64a5a6c2052669ab368a40"}},{"id":{"$t":"http://www.google.com/calendar/feeds/admin%40test.org/public/full/_8d9lcgrfdpr6asjk6hh3gphjccpmaphg6opj0d316sq34cj570p3ic1j6grj4opgcoog"},"published":{"$t":"1900-01-01T12:00:00.000Z"},"updated":{"$t":"2013-08-20T11:13:33.000Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":
The above is a sample of one instance of such chunk of text, the real file could have multiple such chunks.
What i want to do is get the batch script to read the file and when it finds "title":{"$t":"Test Begins","type":"text"} i want Test Begins (in the example above but it could be any text in the real file) to be stored in a variable.
The script should continue reading the text file util it comes across ","startTime":"2014-01-16"}],"gd$transparency" here i want the date stored into a variable.
Now that we have the first pair of variables, i want them to be written to a text file in the following format:
[date] [text]
It keeps doing this until it gets to the end of the file being read.
I have been banging my head over this for a few days a i usually like to learn it without hassling people but i just cant get my head around this.
Your help will be much appreciated.