During a recent project I installed this simple script on all development machines and simple have it run every hour by a scheduler.
Stampme.cmd:
@ECHO off
SETLOCAL
IF [%1] NEQ [] goto s_start
:: Author - Simon Sheppard, July 2003
:: Tested for Windows NT, 2K, XP
:: Adapted by John Minkjan, January 2008 Ciber
ECHO STAMPME.cmd
ECHO Copy to a backup directory
ECHO and rename a file with the DATE/Time
ECHO.
ECHO SYNTAX STAMPME sh.rpd
ECHO.
:: To change the filename format just change around the last line below
GOTO :eof
:s_start
SET
_file=%~n1%
SET _pathname=%~f1%
SET _ext=%~x1%
::Get the date
:: note ISO 8601 date format would require 4 digit YYYY Year)
FOR /f "tokens=6-8
delims=/ " %%G IN ('NET TIME \\%computername%') DO (
SET _mm=%%G
SET
_dd=%%H
SET _yy=%%I
)
:: Get the time
FOR /f "tokens=1,2 delims=: "
%%G IN ('time/t') DO (
SET _hr=%%G
SET _min=%%H
)
copy "%_pathname%"
".\backup\%_file%-%_yy%-%_mm%-%_dd%@%_hr%-%_min%%_ext%"
Till Next Time