Saved Bookmarks
| 1. |
Solve : Copy multiple files? |
|
Answer» Hi I have a list of many filenames , I need the code in DOS to copy them all to another folder I am assuming the list of filenames contains the complete drive letter and path of each file like this example: Code: [Select]S:\App-install\wizapp15\license.txt S:\App-install\wizapp15\versions.txt S:\App-install\wselect\out$$.txt S:\App-install\wselect\screen.txt S:\App-install\wselect\test$$.txt S:\App-install\wselect\Wselect.txt S:\App-install\X-Setup-9.2.100\readme-EN.txt S:\App-install\X-Setup-9.2.100\ReadMe.txt S:\Backup\basic\FreeBASIC\changelog.txt S:\Backup\basic\FreeBASIC\docs\GoRC.txt S:\Backup\basic\FreeBASIC\docs\gpl.txt D:\eula.1028.txt D:\eula.1031.txt D:\eula.1033.txt D:\eula.1036.txt D:\eula.1040.txt D:\eula.1041.txt D:\eula.1042.txt D:\eula.2052.txt D:\eula.3082.txt D:\fraglist.txt D:\Alacarta\TVE-Alacarta-Hoy\Bin\Progtitle.txt D:\Alacarta\TVE-Alacarta-Hoy\Bin\thisfilename.txt D:\Alacarta\TVE-Alacarta-Hoy\Bin\Ngrep-byline-dump\dump1.txt D:\Alacarta\TVE-Alacarta-Hoy\Bin\Ngrep-byline-dump\dump2.txt D:\OS-Install\cd110511\README.TXT D:\Virtual Machines\Suse114-1\Readme.txt You can use a batch script to read the file line-by-line and copy each file to the chosen destination directory. Assumptions: The file CONTAINING the list is C:\test\File List.txt The files are copied to D:\Destination\Folder Try this Code: [Select]echo off set listfile=C:\test\File List.txt set CopyToFolder=D:\Destination\Folder for /f "delims=" %%A in ( ' type "%listfile%" ' ) do copy "%%A" "%CopyToFolder%" |
|