Replace this line:
Code: Select all
for /f "tokens=1-7 delims=: " %%a in (' type "%%~nz.txt" ^| find "DateTimeOriginal :" ') do (
with these two and try it:
Code: Select all
type "%%~nz.txt" | find "DateTimeOriginal :" >temp01.tmp
for /f "usebackq tokens=1-7 delims=: " %%a in ("temp01.tmp") do (