I am using this code below to copy files from a list. Everything is working, however doesn't work when files have NO extension. I don't know to fix it.
@echo off
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
SET "src=T:\CNC-Related\CNC Programs\Biesse\Rover346\01 MAIN\S-LINE\SLE"
SET "dst=U:\Users\Edimar\PROJECTS\REPLACE LOCKING BAR\CST640\S-Line\PROGRAM\R346"
SET "file_list=.\files.txt"
SET "out=.\result.log"
echo > %out%
FOR /F "usebackq eol=| delims=" %%f IN ("%file_list%") DO (
rem just searching to find out existense of file
WHERE /Q /R %src% "%%f"
IF "!ERRORLEVEL!" == "0" (
FOR /F "usebackq eol=| delims=" %%s IN (`WHERE /R %src% "%%f"`) DO (
echo "%%s => %dst%\%%f" >> %out%
@Xcopy /y "%%s" "%dst%\%%f"
)
) ELSE (
echo %%f is not found! >> %out%
)
)