This uses a helper batch file called repl.bat
from - http://www.dostips.com/forum/viewtopic.php?f=3&t=3855
The input file is "AssemblyInfo"
and it is overwritten with the new data.
Change "c:\backup folder"
to your file location.
@echo off
pushd "c:\backup folder"
for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set "dt=%%a"
set "YYYY=%dt:~0,4%"
set "MM=%dt:~4,2%"
set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%"
set "Min=%dt:~10,2%"
set "Sec=%dt:~12,2%"
set datestamp=%YYYY%%MM%%DD%
set timestamp=%HH%%Min%%Sec%
set fullstamp=%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%
type "AssemblyInfo" |repl "^(.AssemblyDescription=).*" "$1\x22%fullstamp%\x22]" mx >"AssemblyInfo.tmp"
move "AssemblyInfo.tmp" "AssemblyInfo" >nul
popd