How to get the window title text from batch file

How can I get the value of the current window's title, set like this: TITLE Here Are The New Contents