skip to Main Content

Visual Studio Code is not recognizing the touch index.html command . It used to work. Now I get this error:

PS C:Userskimim_000mynewprofile> touch index.html
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 index.html
  •   + CategoryInfo          : ObjectNotFound: (touch:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

2

Answers


  1. I had the same issue as well. I used "code" in place of "touch" to create my file.

    Login or Signup to reply.
  2. Are you using PowerShell?

    I think this answer explains it well if you are.

    https://stackoverflow.com/a/67665941/15102120

    Basically, touch isn’t a PowerShell or Windows command. The command if this is the issue is New-Item or Get-Item

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search