copy command to copy multiple files only copies the first file
-
28 Februari 2012 8:06
hi friends
i have a simple question and i'm sorry to ask that here. i didn't get any result after Googling and testing
in win2008 R2 i want to copy 3 files from c:\ to d:\folder2 , but none of the following commands works !! they only copy the first file. what is the cause ?
c:\>copy file1.txt + file2.txt + file3.txt D:\folder2
or
c:\>copy file1.txt+file2.txt+file3.txt D:\folder2
where i am wrong ?
thank in advance
- Diedit oleh john.s2011 28 Februari 2012 8:06
Semua Balasan
-
28 Februari 2012 8:12
copy file1.txt d:\folder2 & copy file2.txt d:\folder2 & copy file3.txt d:\folder2
Grant Ward, a.k.a. Bigteddy
- Disarankan sebagai Jawaban oleh OberwaldMicrosoft Community Contributor 28 Februari 2012 8:31
- Ditandai sebagai Jawaban oleh john.s2011 28 Februari 2012 9:12
-
28 Februari 2012 8:31
c:\>copy file1.txt + file2.txt + file3.txt D:\folder2
The above command would almost work but it would do something other than what you had intended:
copy file1.txt + file2.txt + file3.txt D:\folder2\Result.txt
It merges the three files and it puts the result into Result.txt. The difference between + and & is this:
+ will cause the files to be merged.
& will cause several commands on one line to be executed one after the other, as if each command was on its own line- Ditandai sebagai Jawaban oleh john.s2011 28 Februari 2012 9:12
-
28 Februari 2012 9:12
c:\>copy file1.txt + file2.txt + file3.txt D:\folder2
The above command would almost work but it would do something other than what you had intended:
copy file1.txt + file2.txt + file3.txt D:\folder2\Result.txt
It merges the three files and it puts the result into Result.txt. The difference between + and & is this:
+ will cause the files to be merged.
& will cause several commands on one line to be executed one after the other, as if each command was on its own linehi pegasus
thank you very much for your great explanation
regards
-
28 Februari 2012 9:13
copy file1.txt d:\folder2 & copy file2.txt d:\folder2 & copy file3.txt d:\folder2
Grant Ward, a.k.a. Bigteddy
hello Bigteddy
thank you very much for great syntax
regards