Windows equivalent of 'touch' (i.e. the node.js way to create an index.html)

后端 未结 19 2237
一整个雨季
一整个雨季 2020-11-28 00:47

On a windows machine I get this error

\'touch\' is not recognized as an internal or external command, operable program or batch file.

19条回答
  •  無奈伤痛
    2020-11-28 01:18

    You can use this command: ECHO >> filename.txt

    it will create a file with the given extension in the current folder.

    UPDATE:

    for an empty file use: copy NUL filename.txt

提交回复
热议问题