I have the next batch file, but its matching by file name. This time the list I have is huge and has file names without extension, but can I ignore the extension and copy for example: filename.* to the destination folder?
This is the current script:
title Deploying Edithor
set src_folder=S:\ApliTelinver\Compilacion\Edithor 10.5\Pipe
set dst_folder=J:\alazarev\Objetos-Migracion-Pipe
set filelist=filelist-pipe.txt
echo Origen: %src_folder% >> "pipemigracion-!datetimef!.log"
echo Destino: %dst_folder% >> "pipemigracion-!datetimef!.log"
echo.
REM for /f %%i in (%filelist%) DO xcopy /S/E/U/Y "%src_folder%\%%i" "%dst_folder%" > "%dd%.log"
for /f "delims=" %%i in (%filelist%) do (
xcopy /S/E/U/Y "%src_folder%\%%i" "%dst_folder%" >> "pipemigracion-!datetimef!.log"
)
echo Success. >> "pipemigracion-!datetimef!.log"
echo.
echo Done - Check log pipemigracion-!datetimef!.log
echo.
pause
goto start
Here’s how I’ve understood the question. The file list,
filelist-pipe.txt, contains file names, and all of the names are without extensions.If so, you only need to append
.*to the source file path in theXCOPYcommand:Please let me know if I’m still missing something.