Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![cb123](https://secure.gravatar.com/avatar/cd565cec3d898585c7ef8dba5ae56b96?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
cb123
Courses Plus Student 9,858 Pointstouch command not recognized
I am trying to walk through this "Create a Branch" video, but running the commands against our github, not using the workspace. Everything is working up to the point of the "touch README.md" command which evokes " 'touch' is not recognized as an internal or external command, operable program or batch file." I am using Windows 7.
Is there an alternate command for Windows OS users or do we need to use some file editor to mimic the step?
3 Answers
![Kai Nightmode](https://uploads.teamtreehouse.com/production/profile-photos/12766/micro_Profile.jpg)
Kai Nightmode
37,045 PointsMy favorite method to create a new empty file in Windows without having to use an editor is...
copy con README.md
First enter the above command and press enter. Next, you can optionally enter text and/or just press CTRL + Z to finish. It will then tell you that your new file was copied (aka created). Quick and easy. ^_^
P.S. - The con keyword means copy contents from the console. A neat feature indeed.
![Christian van Lierop](https://secure.gravatar.com/avatar/7a4a3d01375d07a6844badd22b0a10a0?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Christian van Lierop
13,758 PointsI have the exact same issue working from Visual Studio Code:
touch README.md 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 README.md
- ~~~~~
- CategoryInfo : ObjectNotFound: (touch:String) [], CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException
@Daniel Gagan : your fix doesn't seem to work for me either
copy con README.md copy : Cannot find path 'H:\Webdesign\100 Javascript projects\TestEnMeet\con' because it does not exist. At line:1 char:1
- copy con README.md
- ~~~~~~~~~~~~~~~~~~
- CategoryInfo : ObjectNotFound: (H:\Webdesign\10...\TestEnMeet\con:String) [Copy-Item], ItemNotFoundException
- FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand
Not able to continue and understand the branching from this point on :-(
![Jamie Reardon](https://uploads.teamtreehouse.com/production/profile-photos/9708342/micro_treehouse-mod-slack-profile-pic.jpg)
Jamie Reardon
Treehouse Project ReviewerThe touch
command is not a native command to Windows, its for UNIX/Linux e.g. MacOS. An equivalent to Windows would be what has been suggested in other comments, as well as echo
and type
. Having said that, you can still get access to this command through using a different console/terminal in Windows e.g. Git Bash.
See https://stackoverflow.com/questions/55584514/is-there-a-windows-equivalent-to-touch-to-create-a-new-file-in-cmd and https://stackoverflow.com/questions/1702762/how-can-i-create-an-empty-file-at-the-command-line-in-windows.