How to create index.js or any file using terminal in vscode or cmd ?
I have tried touch index.js but it is not recognised by my terminal in windows 10
Please help me with this
I have tried touch index.js but it is not recognised by my terminal in windows 10
Please help me with this
2
Answers
In windows
touch index.js
will not work. this command works inUNIX
based OS.try this instead..
Here,
touch
command works onUnix-based
systems, and it’s native command, does not work on Windows, it works onmacOS
andLinux
,You can use
type
command to create a new file. For example:You can also use
echo
andcopy
command, but it’s only use in cmd, not in PowerShell. Whiletype
command work on both.Note:
nul
is a way to represent a nonexistent file or a file that doesn’t contain any meaningful data.