Advertisements

doc bat file redirecting output to a variable

From here http://weblogs.asp.net/lorenh/archive/2006/03/24/silly-batch-file-tricks-redirecting-stdout-into-an-evironment-variable-and-dp0.aspx

FOR /F “tokens=*” %%i in (‘%~dp0sometool.exe’) do SET TOOLOUTPUT=%%i

Advertisements

One Response

  1. […] the original post: doc bat file redirecting output to a variable Share and […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: