Given your list of file names in a file called File-list.txt
, the following lines should do what you want:
@echo off
set src_folder=c:\whatever
set dst_folder=c:\target
for /f "tokens=*" %%i in (File-list.txt) DO (
xcopy /S/E "%src_folder%\%%i" "%dst_folder%"
)
More Related Contents:
- Progress bar shows "echo is OFF" message
- Batch – Commenting on YouTube [closed]
- Why is no string output with ‘echo %var%’ after using ‘set var = text’ command in cmd? [duplicate]
- Where does GOTO :EOF return to?
- How to set environment variables with spaces?
- Split long commands in multiple lines through Windows batch file
- Assign command output to variable in batch file
- Why are other folder paths also added to system PATH with SetX and not only the specified folder path?
- Can I mask an input text in a bat file?
- How do you loop in a Windows batch file?
- How do I make a batch file terminate upon encountering an error?
- Batch script to find and replace a string in text file without creating an extra output file for storing the modified file
- batch cmd exits as I enter the input with space
- Get size of a directory in ‘MB’ using batch file
- Set output of a command as a variable (with pipes) [duplicate]
- ERRORLEVEL inside IF
- How to write a full path in a batch file having a folder name with space?
- batch script – read line by line
- windows batch files: setting variable in for loop
- How do I compare timestamps of files in a batch script?
- Why are Danish characters not displayed as in text editor on executing batch file?
- How can I escape an exclamation mark ! in cmd scripts?
- How to set a timeout for a process under Windows 7?
- Batch – Converting variable to uppercase
- Bat file to delete files only when younger files are present
- Less than or equal to
- My Batch File keeps looping, but why?
- Batch file for PuTTY/PSFTP file transfer automation
- Call a subroutine in a batch from another batch file
- How do I create a batch file timer to execute / call another batch throughout the day