1: 2: 3: 4:
@echo off set hour=%time:~0,2% if "%hour:~0,1%"==" " set hour=0%hour:~1,1% copy S:\Apps\EAM\PDCApptLtr\Prod\Appointment_Combined.csv S:\Apps\EAM\PDCApptLtr\Prod\Appointment_Combined_%date:~4,2%%date:~7,2%%date:~12,2%%hour%%time:~3,2%%time:~6,2%.csv