I have the following script, but how can i make the %mytimestamp% as 20160929_132659 yyyymmdd_hhmmss
format?
where i am getting invalid orientation and with comma:
di29092016_132659,71
set mydate=%date:/=%
set mytime=%time::=%
set mytimestamp=%mydate: =%_%mytime:.=_%
if exist "C:\scan\scan.zip" (
if exist "\\be\c$\doc\scan.zip" (
copy C:\scan\scan.zip "\\be\c$\doc\%mytimestamp%scan.zip"
) else (
copy C:\scan\scan.zip "\\be\c$\doc"
)
)