Copy con

Copy con


  • Copy con is an MS-DOS and Windows command line command that allows the creation of a file through the command line. To use this command, type copy con followed by the name of the file you want to create, as shown below.

    copy con myfile.txt

  • After this command is typed, you'll be returned to a blank line, which is the start of your file. Enter the lines you want to insert into the file and, when done, press Ctrl+Z to create the file. If you want to cancel the creation of the file, press Ctrl+C.

    Tip

  • Although this is a fast way to create a small file, should you need to edit a file or work on something larger, use a text editor, such as Windows Notepad. You can start Notepad from a command line using the start command.

    Note

  • In Windows 8 and 10, if there is text already in the file, pressing Ctrl+C deletes the last line of text and saves the file. If you are on the first line or have not typed any text, pressing Ctrl+C cancels the creation of the file.


    What is an Operating System? » Computer Shortcut Keys and their Functions » Keyboard Function Keys » Computer Basics - Hardware - Software - Parts

    Short Stories for Kids - Moral Stories – English Short Stories for Children - Moral Stories for Kids - Stories for Kids - Funny Story for Kids - Scary Stories for Kids - Really Funny Short Stories - Bedtime Stories
    Proverb Stories

    Powerful Motivational Quotes for Students » Success Quotes » English Short Stories for Kids

    Cabin Crew Jobs & Career Advice » Secretary Job Description » Receptionist Job Description » Top 100 Interview Questions and Answers » How to Prepare for an Interview » How to Write a CV » How to Choose a Career » Computer Shortcut Keys and their Functions

    Scholarships in Australia » Scholarships in Austria » Scholarships in Belgium » Scholarships in Canada » Scholarships in Germany » Scholarships in Ireland » Scholarships in Italy » Scholarships in Japan » Scholarships in Korea » Scholarships in Netherlands » Scholarships in Switzerland » Scholarships in UK » Scholarships in USA

    Scholarships for Study in Africa » Scholarships for African Students » Undergraduate Scholarships » African Women Scholarships & Grants Scholarships for Study in Africa » Scholarships for African Students » Undergraduate Scholarships » African Women Scholarships & Grants Scholarships for Study in Africa » Scholarships for African Students » Undergraduate Scholarships » African Women Scholarships & Grants Short Stories for Kids - Moral Stories – English Short Stories for Children - Moral Stories for Kids - Stories for Kids - Funny Story for Kids - Scary Stories for Kids - Really Funny Short Stories - Bedtime Stories
    Proverb Stories
    Powerful Motivational Quotes for Students » Success Quotes »Scholarships in UK » Scholarships in USA Scholarships in UK » Scholarships in USA Scholarships in UK » Scholarships in USA Scholarships in UK » Scholarships in USA Scholarships in UK »
    Success Quotes »Scholarships in UK »

  • Click here to post comments

    Join in and write your own page! It's easy to do. How? Simply click here to return to Computer Basics FAQ.