•Arnošt Havelka
Copy Con Command
Create simple text files directly from the command line.
Start Interactive LessonCopy Con Command
copy con is a classic trick for creating short text files directly in the terminal without opening a text editor like Notepad. "Con" stands for "Console", so you are literally copying from the console input to a file.
Usage:copy con
[filename]
F6 or Ctrl+Z
Press this after typing your text to save the file.
Enter
Press Enter to move to a new line while typing.
How to Use It
- Type
copy con <filename>. - Press Enter.
- Type your text. You can use multiple lines.
- When finished, press F6 or Ctrl+Z. You will see
^Zappear. - Press Enter to save the file.
Note: You cannot edit previous lines once you've pressed Enter. This is strictly for quick, one-off file creation.
Real-World Examples
1. Creating a simple batch file
Quickly create a script to automate a task.
Command Prompt
C:\Users\User>copy con hello.bat
2. Creating a To-Do list
Jot down a few items rapidly.
Command Prompt
C:\Users\User>copy con todo.txt
Knowledge Check
1 / 3What does 'con' stand for?