1.

Solve : batch, variables, and images?

Answer» <html><body><p>Hello world,<br/>first <a href="https://interviewquestions.tuteehub.com/tag/post-2638" style="font-weight:bold;" target="_blank" title="Click to know more about POST">POST</a> for me here.<br/><br/>I've a problem about identify if an <a href="https://interviewquestions.tuteehub.com/tag/image-11684" style="font-weight:bold;" target="_blank" title="Click to know more about IMAGE">IMAGE</a> is portrait or landscape...<br/><br/>Find a program that tell me meseurement in this <a href="https://interviewquestions.tuteehub.com/tag/format-11876" style="font-weight:bold;" target="_blank" title="Click to know more about FORMAT">FORMAT</a>: myprog.exe test.jpg<br/><br/>[IPTCFIELDS]<br/>3:40 = 256<br/>3:50 = 171<br/><br/><br/>So i write a small batch that find 2 <a href="https://interviewquestions.tuteehub.com/tag/value-238057" style="font-weight:bold;" target="_blank" title="Click to know more about VALUE">VALUE</a> (256,171) and <a href="https://interviewquestions.tuteehub.com/tag/put-11868" style="font-weight:bold;" target="_blank" title="Click to know more about PUT">PUT</a> into a variable:<br/><br/>myprog.exe %1 -ds | for /f "Tokens=1-2 Delims==" %%e in ('find /I "3:40 ="') do set g=%%f<br/>myprog.exe %1 -ds | for /f "Tokens=1-2 Delims==" %%s in ('find /I "3:50 ="') do set h=%%t<br/><br/><br/><br/>all seems to work but in my environment %g% and %h% are not present.<br/><br/>Anyone can help me?<br/><br/>A.Try<br/><br/>for /f "Tokens=1,2,3 Delims==" %%e in ('myprog.exe %1 -ds | find /I "3:40 ="') do set g=%%f<br/></p></body></html>


Discussion

No Comment Found