Make a new file in cmd

To create a new file in the Command Prompt (Cmd), you can use the following commands:

Method 1: Using the type command

  1. Open the Command Prompt (Cmd).
  2. Type the following command and press Enter:
    type nul > newfile.txt

    This will create a new file named newfile.txt in the current directory.

Method 2: Using the echo command

  1. Open the Command Prompt (Cmd).
  2. Type the following command and press Enter:
    echo. > newfile.txt

    This will create a new file named newfile.txt in the current directory.

Method 3: Using the touch command (in Windows 10 and later)

  1. Open the Command Prompt (Cmd).
  2. Type the following command and press Enter:
    touch newfile.txt

    This will create a new file named newfile.txt in the current directory.

Note: If you want to create a file with a specific content, you can use the echo command followed by the content you want to write to the file. For example:

echo "Hello World!" > newfile.txt

This will create a new file named newfile.txt with the content "Hello World!".