Syntax from class in command line doesnt work in windows

So Im trying to do mkdir -p ~/university/m103/ to set up the parent directory bit the command prompt says this syntax isnt correct. Are things different in Windows?

1 Like

Try to use sudo mkdir -p ~/university/m103/
it will work.!

Hi Ben_65721,

The command for creating a directory is different for Windows. It is md. And instead of ~, you have to provide full path or be in the directory and then create. Run this command from your command prompt on Windows:

C:\> md C:\Users\kanik\university\m103

or without full path like this:

C:\> cd C:\Users\kanik
C:\Users\kanik> md university\m103

*Please change kanik to your Username.

Also, incase, to remove a directory and subdirectories on Windows:

C:\Users\kanik> rmdir university /s /q

It will remove the directory and sub-directories for university.

Kanika

1 Like

Ben asked: “Are things different in Windows?” So no, that won’t work :wink: