I have a text file (SingleFilesList.txt) listing a
series of files including their path in the formT:\A test directory\3\E\0\123456789.jpg
T:\A test directory\3\F\5\123456790.jpg
T:\A test directory\F\1\2\123456789.jpgI would like to copy all the files listed into one
folder. I have used at the DOS command
prompt:For /F "tokens=*" %K in (SingleFilesList.txt)
Do Copy "%K" V:\Test\No errors are generated but files are not
copied to V:\Test. Please can anyone
suggest where I am going wrong?
For /F "tokens=*" %K in (SingleFilesList.txt) Do (Copy "%K" V:\Test\)
=====================================
Helping others achieve escape felicityM2
Thank you for your reply. At first the command didn't work
but a comment about SingleFilesList.txt on another forum
caused me to look at the file in a hex editor. For some
reason a single FF character preceded the first T. Deleting
this character solved it.Your command
For /F "tokens=*" %K in (SingleFilesList.txt) Do (Copy
"%K" V:\Test\)worked as did
for /f "usebackq delims=" %a in ("c:\path to
file\singlefileslist.txt") do copy "%a" v:\testwhich someone had suggested on another forum.
Thanks again for your help.
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |