Command Prompt question

NonazoonaNonazoona Posts: 5Member ■□□□□□□□□□
Hi all, learning the command prompt on windows for the first time. While studying I came across the "copy" command and I have been trying to copy two files at one time to a different folder. The command syntax I've been using is: copy file1+file2+file3 destination. What ends up happening is the files (when I've done it they were .txt files) "merged" together. I list tge three seperate files and they copy over as one file. When I open that file, the text of all 3 files are there.

Is there a way to copy more than one file to a different destination using one input? I know wildcards, but I'm talking files of different types.

Thanks to any and all help in advance!

Comments

  • PhalanxPhalanx I have many leatherbound books... United KingdomPosts: 330Member ■■■□□□□□□□
    An easier way than doing a loop is to use the ampersand.

    eg. copy file1 & copy file2
    Data Privacy & Project/Service Management: PECB GDPR DPO/Practitioner | ITIL 2011: Foundation
    Client & Security:
    MCSE: Mobility | MCSA: Windows 10 | MCITP: Windows 7
    Server & Networking:
    MCSA: Windows Server 2016 | MTA: Networking Fundamentals
    Currently Studying: Project+
  • TheFORCETheFORCE Posts: 2,235Member ■■■■■■■■□□
    Nonazoona wrote: »
    Hi all, learning the command prompt on windows for the first time. While studying I came across the "copy" command and I have been trying to copy two files at one time to a different folder. The command syntax I've been using is: copy file1+file2+file3 destination. What ends up happening is the files (when I've done it they were .txt files) "merged" together. I list tge three seperate files and they copy over as one file. When I open that file, the text of all 3 files are there.

    Is there a way to copy more than one file to a different destination using one input? I know wildcards, but I'm talking files of different types.

    Thanks to any and all help in advance!

    Use the other two commands, xcopy and robocopy, they have more advanced features. Also, if you type <command name> /? It will give you more information on how the command is used.
Sign In or Register to comment.