Batch Files

There are 2 entries for the tag Batch Files
Mirroring output to console and a file

I’ve been doing some more batch file work recently.  I keep getting frustrated that batch files don’t have a way to send output to both the console and a file.  I decided to write a little console application to do this for me. This is largely untested – it’ll be going through the gauntlet tomorrow at work.  What do you think – is this a reasonably valuable little utility?  Was this the best way to do it? 1: class Program 2:...

posted @ Tuesday, April 21, 2009 12:19 AM | Feedback (2)

IF in Batch Files

Yes, I still write batch files.  Sue me.* Here’s one version of my IF statement: 1: SET ProgRoot=%ProgramFiles% 2:  3: IF NOT "%ProgramFiles(x86)%" == "" ( 4: SET ProgRoot=%ProgramFiles(x86)% 5: ) 6:  7: ECHO %ProgRoot% This will output: C:\Program Files (x86 Yes, it’s missing...

posted @ Wednesday, September 10, 2008 4:38 PM | Feedback (0)