windows cmd create empty files code example Example 1: how to create empty file cmd windows copy NUL test.txt Example 2: cmd create empty text type NUL > file.txt