.bat variables in Switch

Post Reply
Sean IO
Newbie
Posts: 18
Joined: Mon Dec 03, 2018 7:58 pm

.bat variables in Switch

Post by Sean IO »

Is there a way to pull variables from a .bat file into Switch. I have a .bat file that executes a vbs script and was wondering if vbs variables could be pulled into switch through the batch file?
cstevens
Member
Posts: 103
Joined: Tue Feb 12, 2013 8:42 pm

Re: .bat variables in Switch

Post by cstevens »

I think you'd have to output it to stdout or stderr and then switch could capture that. It's not going to be able to search through external code to find variables.
Arthur
Member
Posts: 113
Joined: Sat Sep 09, 2017 11:58 pm
Location: Yateley, UK

Re: .bat variables in Switch

Post by Arthur »

Or completely the long way - BAT file is effectively a TXT file. Rename BAT to TXT, so you can Pick up TXT file as XML (using an app for it) and the values shall be there. You may need to adjust some formatting of the BAT, so that it then is better structured as XML, or use RegEX to search through XML Key Values.
Have not tried it, as I never had a need for anything like that, but seems like it is worth a try.
Post Reply