DOS: create file with date and time 

Joined:
01/15/2009
Posts:
82

February 10, 2011 13:29:31    Last update: February 10, 2011 13:31:37
This command script redirects all stdout and stderr to a file with current date and time.
@echo off
@rem Send STDOUT/STDERR to file with current date and time
set d=%date:~4%
set t=%time:~0,-3%

C:\perl\bin\perl myscript.pl >logs\runlog-%d:/=-%-%t::=.%.txt 2>&1
Share |
| Comment  | Tags