I want to use output of one command as input to another command in DOS.
My command is: systeminfo | findstr /C:"OS Name"
Output may be any OS, Ex: vista or XP or 7 or 2008
I want to use this output and call files i hv already created.
Ex: vista.bat, xp.bat, etc
If my output from first command comes Windows Vista, then I want to call vista.bat (c:\vista.bat)
and same for others (for XP call xp.bat, for 7 call 7.bat.
Please help me if anybody know how to do this with batch file.