Simple TimeStamp Logging Utility

Someone on the AnandTech forums requested an example of how to do this, so here it is.
This program receives two inputs at the command line. The first is a path to store a log. The second is the command line string to execute. Then, the program will pipe all the console output to a file named as the current timestamp in YYMMDD_hhmmss format.
For example, if we wanted to log the following command:
dir /O
We'd instead enter the following into the command line:
TimeStampLogger c:\logs\ dir /O
Then it'll pipe the command "dir /O" into a text file in the c:\logs directory. The name of the file will be the system's current time in the above mentioned format with a ".txt" file extension.
This has been compiled with MinGW under Microsoft Windows Vista 64 bit. Some slight modification may be necessary for this program to compile and/or function under a different compiler and/or operating system.


