Copying data from multiple command prompts tabs

Hi All,

i have a scenario where i have to type a command in command prompt and as a result multiple command prompt tabs will be opened ( In this case lets say 5 tabs of command prompt will get opened with some data in each tab ) .
Now my task is to copy the data from all the opened command prompt tabs and paste it in the notepad, kindly help me with this

NOTE : the number of tabs opens after command will differ each time