Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Touch command not working in Terminal of VSC

I'm new and still trying to figure out how to configure my development environment. I'm getting an error when using the touch command in Visual Studio Code. I can use mkdir to create a directory, but can't create a .php file. Here's the error I'm getting. Any ideas? Thank you!

touch : The term 'touch' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + touch new.php + ~~~~~ + CategoryInfo : ObjectNotFound: (touch:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

like image 862
mossexploding Avatar asked Jun 02 '19 18:06

mossexploding


People also ask

Why is my terminal not working in VS Code?

If your terminal is set to run as administrator only, and you are not launching VS Code as administrator, the terminal will not be able to open. You can either change the default terminal or edit the properties of the terminal exe to not run as administrator.

What is touch command in Windows terminal?

In computing, touch is a command used to update the access date and/or modification date of a computer file or directory.


1 Answers

if you use git then, go to the folder of your project where you want to create a file, then right click and chose "git bash here". a terminal/command prompt type window will appear now you can type command "touch .newfilename".

like image 82
Mujtaba Tarar Avatar answered Oct 14 '22 18:10

Mujtaba Tarar