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