I am using below code to transfer files, it is showing on each movement of file that 1 file(s) moved, 1 file(s) moved and so on...but it is not showing at the end that total number of files moved ? it was working for my first code even echo %%i was placed in the same location as placed below...plz help...?
setlocal enabledelayedexpansion
if exist C:\Hi\*.pdf (goto COPYFILES) else (goto NOFILES)
:COPYFILES
for /f %%i in ('DIR /b C:\Hi\*_*.*') do (
echo %%i
set fn=%%i
set fn=!fn:~11,8!
move C:\Hi\%%i E:\!fn!\
)
echo complete
:NOFILES
echo There are no files to move