@echo off

set datetimestamp=%date:~10,4%%date:~4,2%%date:~7,2%%time:~0,2%%time:~3,2%
set logtdtstamp=%date:~10,4%-%date:~4,2%-%date:~7,2% %time%
rem if “%time:~0,1%”==” ” set datetimestamp=%date:~10,4%%date:~4,2%%date:~7,2%0%time:~1,1%%time:~3,2%
rem year day
set datetimestamp=%date:~-4,4%%date:~-7,2%%date:~-10,2%

c:
cd \psam\3rdparty\ovaldi\
set backup_command=”ovaldi.exe -m -x %computername%.html”
echo %backup_command%
ovaldi.exe -m -x %computername%.html
net use z: \\server\datax /user:DOMAIN\Administrator password
md Z:\ovaldi_reports\%datetimestamp%
copy %computername%.html Z:\ovaldi_reports\%datetimestamp%\
net use z: /delete
goto end

:displayusage
cls
@echo;
echo == Arguments are invalid, please see usage information below. ==
@echo;

:end