Saturday 28 January 2017

Creating empty file using command-line in Windows

Have you ever come across creating an empty file in Windows with command-line ? Here is a simple solution :

C:\SimpleTips> fsutil file createnew MyFile.txt 1000

Let's see what is happening here. FSUTIL is a command-line utility for performing FAT and NTFS file system operations. There are a few sub-commands for fsutil. We use file command which is intended for file related tasks. So basically this command creates a new file with name MyFile and size 1000 bytes.