@echo off
SET SOURCE=E:\Images\v5\2FE769AFA97E71E8-09-09.inc_06.mrimg
echo %TIME% #
FOR /F "tokens=1-4 delims=:." %%d in ("%TIME%") do (
SET /A T1=%%d*360000+1%%e*6000+1%%f*100+1%%g-610100
)
COPY %SOURCE% E:\Test\
echo %TIME% ##
FOR /F "tokens=1-4 delims=:." %%d in ("%TIME%") do (
SET /A T2=%%d*360000+1%%e*6000+1%%f*100+1%%g-610100-%T1%
)
echo Copying %SOURCE% took %T2%0. mSec
pause
@echo off
SET SOURCE=E:\Images\v5\2FE769AFA97E71E8-09-09.inc_06.mrimg
echo %TIME% #
FOR /F "tokens=1-4 delims=:." %%d in ("%TIME%") do (
SET /A T1=%%d*360000+1%%e*6000+1%%f*100+1%%g-610100
)
COPY %SOURCE% E:\Test\
echo %TIME% ##
FOR /F "tokens=1-4 delims=:." %%d in ("%TIME%") do (
SET /A T2=%%d*360000+1%%e*6000+1%%f*100+1%%g-610100-%T1%
SET SOURCE=E:\Images\v5\2FE769AFA97E71E8-09-09.inc_06.mrimg
echo %TIME% #
FOR /F “tokens=1-4 delims=:.” %%d in (“%TIME%”) do (
SET /A T1=%%d360000+1%%e6000+1%%f*100+1%%g-610100
)
COPY %SOURCE% E:\Test\
echo %TIME% ##
FOR /F “tokens=1-4 delims=:.” %%d in (“%TIME%”) do (
SET /A T2=%%d360000+1%%e6000+1%%f*100+1%%g-610100-%T1%
)
echo Copying %SOURCE% took %T2%0. mSec
pause
I'm confused what exactly is broken?
OK I see it. If the code bbc button is pressed and the code is pasted extra endlines are being removed. If you type
</pre>
<div></div>
<p></p>
<p>
and paste it in the middle (old school method of bbc before fancy "enter information here" boxes endlines remain entact.
@echo off
SET SOURCE=E:\Images\v5\2FE769AFA97E71E8-09-09.inc_06.mrimg
echo %TIME% #
FOR /F “tokens=1-4 delims=:.” %%d in (“%TIME%”) do (
SET /A T1=%%d360000+1%%e6000+1%%f*100+1%%g-610100
)
COPY %SOURCE% E:\Test\
echo %TIME% ##
FOR /F “tokens=1-4 delims=:.” %%d in (“%TIME%”) do (
SET /A T2=%%d360000+1%%e6000+1%%f*100+1%%g-610100-%T1%
)
echo Copying %SOURCE% took %T2%0. mSec
pause
Interesting an extra endline at the end (so text > two blank lines > text) will only strip one causing the the code to be as the poster intends (text>blank line>text)