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

后端 未结 19 2363
一整个雨季
一整个雨季 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:24

    On windows Power Shell, you can use the following command:

    New-Item 
    

    or

    New-Item  -type file
    

    Note: New-Item can be replaced with its alias ni

提交回复
热议问题