Reputation: 31
I have a folder which contains 1500+ files, all of them are .txt files.
I want to copy about 650+ files from that folder to another folder.
I have a filelist (Filelist.txt) which has list of files I want to copy.
This is what I tried, but didn't work. Can you guys help me?
@echo off
set src_folder=F:\Source
set dst_folder=F:\Destination
set file_list=F:\Filelist.txt
if not exist "%dst_folder%" mkdir "%dst_folder%"
for /f "delims=" %%f in (%Filelist%) do (
xcopy "%src_folder%\%%f" "%dst_folder%\"
)
Upvotes: 3
Views: 8999