set d=%date:~0,10%set d=%d:-=%set d=%d: =0%set t=%time:~0,8%set t=%t::=%set t=%t: =0%echo "%p%%d%%t%"pause
链接:http://blog.csdn.net/zzh87615/article/details/6120987