If it is a C variant a simple printf should suffice. The syntax of yourĬode snippet above is C like, but I'm not sure. Most languages support such output, but since I don't know what language you are working with, it's hard to comment further on that part. ![]() The program's output needs to be directed to the console StdOut device for this to work. įor /f "delims=" %%i in ('pathspec\yourprogram.exe arguments') do set pf=%%i That the executable is named between single quotes, something like this. If the batch procedure invokes the executable - and you have control of the operation (coding) of the executable - the FOR with it's /F switch can be used without resorting to an intermediate file, much like you did with the file. With regard to communicating with a batch procedure, it depends on whether the batch calls the executable or the other way around. ![]() Then responders can eitherĬorrect your attempt or address the bigger problem. It might speed things next time to describe the bigger problem first and add the approach you had tried as an example. ![]() OK, you didn't mention anything about an executable in your original description of the problem.
0 Comments
Leave a Reply. |