-1

I am trying to make a file with the command line with the form of

mkdir -p /path/to/directory && touch /path/to/directory/file.txt

so in my case it will be like this: mkdir -p layout && touch layout/layout.ejs, but I receive a message

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

The folder has been made successfully but the file is not.

phuclv
  • 30,396
  • 15
  • 136
  • 260

1 Answers1

1

Not sure what you're trying to do. You can send text in CMD to a file using the redirect command, >. E.G.

echo "hello world" >c:\temp\layout.ejs

Sends this:

"hello world"

to the file layout.ejs in the C:\temp folder.

Giacomo1968
  • 58,727