When I try using the touch command I get an error saying:'touch' is not recognized as an internal or external command, operable program or batch file.
Asked
Active
Viewed 148 times
2 Answers
1
The touch command in only available on Unix based OS.
However, you can do the same on Windows by running:
type nul > your_file.py

Rhylionn
- 77
- 3
0
dont't use touch
command for windows
use echo
command with redirect operation use > to overwrite and >> to append
c:\Windows\path>echo "" > file.py

Udesh
- 2,415
- 2
- 22
- 32
-
1Well, this creates a file containing two quotation marks, a space and a line-break… – aschipfl Mar 09 '22 at 22:34