How to create an empty or blank file

Updated: 01/05/2018 by Computer Hope

Windows users

Empty example blank file

To create an empty file (0 bytes), it must be a plaintext file. Other types of documents, such as a blank .doc (word processor file) or a blank Excel (spreadsheet), won't work. The reason for this is that they contain extra data that structure and identify the file, even if you haven't entered any data into the document.

From within Windows, right-click in the area you want to create the file. For example, right-click the desktop to create a new text file on the desktop. In the drop-down menu, select New and choose Text Document.

MS-DOS and Windows command line users

Use the copy con command to create an empty file, as shown below. The ^Z represents pressing Ctrl+Z on the keyboard when at a command prompt. After pressing this shortcut, a 1 file copied message should appear.

copy con file.txt

Linux and Unix users

Use the touch command, as shown below, to create an empty file. In the example below, the file "myexample" is created.

touch myexample