Batch: Copy files from txt file into one folder

后端 未结 3 384
我在风中等你
我在风中等你 2021-01-07 01:51

I am attempting to create a batch file to copy several files listed in a text file to a new folder. I have found several threads relating to this, but I can still not get th

3条回答
  •  生来不讨喜
    2021-01-07 02:26

    One sample which worked for me...

    Replace my directories C:\whatever and C:\temp\svn with yours...

    assuming that your filelist is named antidump_list.txt and located under C:\temp\svn\

    > set src_folder=C:\whatever
    > set dst_folder=C:\temp\svn
    > for /f %%i in (C:\temp\svn\antidump_list.txt) DO copy "%src_folder%\%%i" "%dst_folder%\%%i"
    

    Regards,

    Gottfried

提交回复
热议问题