We can create files from command line in two ways. One is using fsutil command and the other way is to use echo command. if you want to write any specific data in the file then use echo command using which you can write the data directly to the file from command line. If you are not bothered about the data in the file but just want to create a file of some specific size then you can use fsutil command.
To create file using echo
echo text-to-be-written-into-the-file > filename.txt
example:
C:\>type sample.txt
To create file using fsutil command:
fsutil file createnew
example:
C:\data>dir