0

I am using PyCharm 2023.1.2 edition and I was trying to create a new file from terminal window using create, touch commands but nothing seems to workout .so, if anyone knows how to create a file using command please help me out. Thanks in advance.

I tried to create a file name second using create second.py. create : The term 'create' 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

  • create second.py
  •   + CategoryInfo          : ObjectNotFound: (create:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

and this is happening .

  • `ni second.py`? – DallogFheir Aug 22 '23 at 15:24
  • `copy NUL second.py` is a bit of a hack, but works easily enough. You're essentially copying 'nothing' into a new file with the given name. – JRiggles Aug 22 '23 at 15:26
  • Your error message looks like Powershell rather than CMD, so see also: https://stackoverflow.com/questions/45446285/creating-new-file-through-windows-powershell – slothrop Aug 22 '23 at 15:28

0 Answers0