Sign in to follow this  
plywood

pipelining output

Recommended Posts

If I evoke a console program - call it "foo.exe" from the command line, and it outputs string-based data, is there a DOS command (or a series of batch file commands) to pipeline this string output to a .txt file? For instance, foo.exe takes a single parameter: the name/url of a .qfx file: C:\> foo C:\apps\widget\whatev.qfx The output of which might be: Hello, foo! Today is a lovely day! What I am looking for is a way to simply "automate" foo's output such that it is sent to (and saved to) a Notepad (.txt) file. Would it be *something* as simple as: C:\> foo C:\apps\widget\whatev.qfx | output.txt ?? hopefully I can avoid getting into make files and batch files...

Share this post


Link to post
Share on other sites
There's nothing maybe about it. The right angle bracket (aka greater than) was the redirect output symbol used by DOS, so it was retained by the windows console.

foo > output.txt

foo C:\apps\widget\whatev.qfx > output.txt

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this