How can I copy files from multiple folders using the Windows command line?
12,371
you can try it using a batch file
place all the copy commands that you need into the batch file, for example
copy <path1>\file*.txt <destination>
copy <path2>\file*.txt <destination>
and so on as many times as you need. Then run the batch file
Create the batch file in notepad and save with the .bat extension
Related videos on Youtube
Author by
victor
Updated on September 18, 2022Comments
-
victor over 1 year
I have
txt
files in multiple folders: (folder_1, folder_2 . . . folder_n).I would like to copy all these files into another directory using the Windows command line.
How can I accomplish this?
-
tvdo almost 12 yearsHow would you like conflicting filenames to be handled? Ignored (skipped)? Overwritten? Abort the copy operation? Could you provide an example (list some sample source file paths and same destination file paths)?
-
tvdo almost 12 yearsWould the answers to this question help? They handle conflicting filenames.
-
-
tvdo almost 12 yearsThe question is asking about copying files from multiple folders. Unless you are recommending manually changing to each directory before copying, this does not answer the question. And the question implies a large number of directories where manual switching is far from optional.
-
Chuzein Part II almost 12 yearsI apologize if I am wrong answer just to answer what I understand