-1

I am trying to run PythonScripts and Hatch on my cmd by running the command " cd Downloads/PythonScripts/Hatch" but everytime I try this, the response is " the system cannot find the path specified." May I know how to cd into the folder such that the files appear in the cmd and not in another location.

I have tried to search many websites for an answer but all to no avail. Is this a path issue? can anyone help me with this? Sorry, but I am noob at coding and programming as I just started 2 weeks ago. Thanks for anyone's help! I am using python 2.7.17 and windows 10.

dianpiggy
  • 9
  • 5
  • It's not a Python thing. `cd` *without* a leading backslash (or slash, as you are using – and modern Windows happily accept) looks for the path **in your current directory**. This suggests you are not at a place where "Downloads" is a subdirectory of. – Jongware Apr 24 '20 at 09:44
  • what is my current directory? or is there any recommended way I can try to fix this? Thank you so much. – dianpiggy Apr 24 '20 at 10:00
  • sir, you are a genius. Thank you for your help – dianpiggy Apr 26 '20 at 13:39

2 Answers2

0

Is the downloads folder located in the same folder from which you are running the cmd? (standard would be c:\Users*username*). If not - try using the full path.

0

Unless the current working directory contains a directory named Downloads, the path will not be found.

My guess is that you want to use:

CD /D "%USERPROFILE%\Downloads\PythonScripts\Hatch"

Avoid hardcoding C:\Users\username since that might not be the correct location. The system knows the correct location and puts it into the USERPROFILE environment variable.

If the Downloads directory is in a different location, then enter the path to it.

CD /D "C:\the\other\place\Downloads\PythonScripts\Hatch"
lit
  • 10,936
  • 7
  • 49
  • 80