Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To create an empty file using the command line in Windows, follow these steps:

  1. Open the command prompt by pressing Win+R and typing cmd in the "Run" box.

  2. Navigate to the directory where you want to create the file using the cd (change directory) command.

  3. Once you've navigated to the directory, type the following command to create an empty file:

    copy nul filename.extension
    

    Replace "filename.extension" with the desired name of your empty file and the desired extension. For example, if you wanted to create an empty text document called "example.txt", you would type:

    copy nul example.txt
    
  4. Press enter to create the file.

The empty file has now been created in the directory you specified.