0

I am using composer to install Magento 2.4.6-p1 on my local computer. I have installed XAMPP on my F disk, so the route for installing Magento is F:\xampp\htdocs. So I inputted cd F:\xampp\htdocs in the Command Prompt, however there is no change, it still starts with C:\Users\zhf>. However, in the tutorial I follow, when the person input C:\xampp\htdocs, I see it starts with C:\xampp\htdocs in his Command Prompt. enter image description here enter image description here

Also I tried to input the next command in Command Prompt: composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.4.2 It returned the error of The syntax of the command is incorrect.

I think I need to first come to the right route, which is F:\xampp\htdocs. But I really don't know how to. When I input cd F:\xampp\htdocs, it always comes next with C:\Users\zhf>, no change.

Zach
  • 21
  • 2
  • MSDOS had a separate current directory for each drive, and Windows emulates this: if your current _drive_ is C: then `cd X:\something` where X is not C changes the current directory _for X_ but does not change the drive from C to X. Either use `F:` to change the _drive_ to F:, or use `cd /d` to change the directory _and_ drive; see `cd /?` for help. Also see https://ss64.com/nt/cd.html for more details. – dave_thompson_085 Jun 25 '23 at 04:29
  • I used cd /d F:\xampp\htdocs, and now successfully changed to "F:\xampp\htdocs", thanks a lot! Is there any way to learn the command line systematically? – Zach Jun 25 '23 at 05:33
  • since you're new you should learn powershell instead, it's free of legacy things in cmd and are much more consistent in everything. And you can do lots of things that are impossible or very difficult in cmd. And in computers that's called a path, not route – phuclv Jun 25 '23 at 09:41
  • 1
    Does this answer your question? [Command prompt won't change directory to another drive](https://stackoverflow.com/questions/11065421/command-prompt-wont-change-directory-to-another-drive) – phuclv Jun 25 '23 at 09:41

0 Answers0