cmd 

type nul > file.txt -> 新建空文件

echo nul > file.txt -> 新建文件 包含“nul”

notepad 新建并编辑


powershell

new-item

type 和 echo 也可以 就是会有warning


cmd 一行命令 新建文件同时新建父目录

必须先新建目录才能再新建子文件 ;

mkdir templates;  notepad templates\index.html