0

I recently installd python on my system and am trying to make a directory for python files in my Windows 8.1 system using the command prompt. When I write the following simple command in cmd,

 mkdir xyz

I get a reply - Access is denied.

What is the problem here?

4
  • do you have permission to create folders in the directory you want to create the folder?
    – SimonS
    Dec 20, 2016 at 8:11
  • how do I know which is the current working directory in cmd? Dec 20, 2016 at 8:14
  • 1
    the path on the left hand side of the command you enter. like: C:\WINDOWS\system32> mkdir xyz but if you specify mkdir like this: mkdir C:\somepath\newfolderyou need permission in somepath to create the newfolder there
    – SimonS
    Dec 20, 2016 at 8:22
  • Thanks! At first I was typing the first command. I tried the second command and it perfectly worked. Thanks a lot again! Dec 20, 2016 at 8:30

1 Answer 1

0

You need write permission on the folder where you want to create your subfolder in.

C:\WINDOWS\system32> mkdir xyz

for this command you need write permission in C:\WINDOWS\system32

C:\WINDOWS\system32> mkdir C:\somepath\xyz

for this command you need write permission in C:\somepath

3
  • Can we make directories only on C drive? I tried making one in another drive. The folder gets created but I am not able to change the directory using cd command. Dec 20, 2016 at 9:04
  • to change the directory, you just write the letter like this: D:. after that you can cd inside D: like cd D:\somepath\somefolder
    – SimonS
    Dec 20, 2016 at 10:01
  • Yes, I tried that earlier but in vain. However, cd /d D:\somepath\somefolder worked. Dec 20, 2016 at 13:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .