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

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

    Assuming the file exists and you just need to update the timestamp.

    type test.c > test.c.bkp && type test.c.bkp > test.c && del test.c.bkp
    

提交回复
热议问题