My employer asked me to manually copy some movies from a server (which I have .txt list of) to an external hard drive so that he can send them to another branch. But since there are hundreds of movie files in the list and the server, I was wondering if I could get or write a script which could copy them at once using my text file list? Any help would be really appreciated!
Note: I'm using Windows 10 on a PC connected to 2 Data Drive Servers The text file list has each movie name separated line by line
I have tried some code that I found in this link: Copy a list (txt) of files
@echo off
set src_folder=d:\source\
set dst_folder=d:\target\
set dir_list=d:\copylist.txt
if not exist "%dst_folder%" mkdir "%dst_folder%"
for /f "delims=" %%f in (%dir_list%) do (
if not exist "%dst_folder%\%%f\" (
mkdir "%dst_folder%\%%f\"
)
xcopy "%src_folder%\%%f\*.*" "%dst_folder%\%%f\"
)
It keeps saying that %%f was unexpected, instead of copying the movie folders based on the text list