Ex46 syntax issue with mkdir

This is the command and the reply:

projects\skeleton> mkdir bin data doc ext lib tests lib/NAME
mkdir : A positional parameter cannot be found that accepts argument ‘data’.
At line:1 char:1

  • mkdir bin data doc ext lib tests lib/NAME
  •   + CategoryInfo          : InvalidArgument: (:) [mkdir], ParameterBindingException
      + FullyQualifiedErrorId : PositionalParameterNotFound,mkdir

I Google’d; apparently the issue someone else had resulted from using powershell. So I switched to Command, hopped back into the directory, and tried again. This time, another error:

projects\skeleton>mkdir bin data doc ext lib tests lib/NAME
The syntax of the command is incorrect.

I don’t really understand what this is doing so I’m having a hard time guessing at the cause; maybe the issue is that data is a disallowed or differently allocated? Maybe the computer misunderstands one of the names as a function?

If I need to make 7 directories (bin, data, doc, ext, lib, tests, and lib/NAME) I can do that manually. But I doubt lib/NAME is a valid naming convention, bringing the rest into question. Is it one file with some data attribute, some bin filetype, and the others are further assigned attributes? Did I tell the computer to make a bin file, a data file, a doc file, and ext file, and a lib file, all named by their type?

I’m sorry to ask such a novice question. If I had any idea what the command intended I’d just do it another way, but I don’t know what we expect the final result to be, so I don’t even know how to google for a solution. I have now also posted to Stack Exchange. If I get my answer there I’ll cross-post to help any one in the same boat.

This post was flagged by the community and is temporarily hidden.


OK, thank you. But I don’t know what the arguments are; so do I put commas betwixt each set of words? What should I have typed? “mkdir bin, data, doc, ext, lib, tests, lib/NAME”?

My problem is that I don’t understand the desired outcome: Six files? Seven? Eight?

the command line instruction doesn’t work and “I use a directory named projects to store all the various things I’m working on. Inside that directory I have my skeleton directory that I put the basis of my projects into.” doesn’t tell me what the “skeleton” is supposed to have, or look like, or be. I need to know any of these things to be able to solve this. Please help. Obviously lib/NAME isn’t a directory intended created by the instruction. So what am I supposed to be accomplishing? What did the instructions fail to tell my computer to do? I can’t begin to problem solve until I know the problem. Searching “Make skeleton in command prompt” isn’t gonna tell me what I’m supposed to be doing and I don’t have enough information to better investigate.

projects\skeleton> mkdir bin data doc ext lib tests lib/NAME

Actually this single line tells you exactly what the project skeleton should look like. A root directory (named skeleton here) with a couple of sub-directories: bin, data, doc, ext, lib, and tests. The lib directory will have yet another sub-directory (called NAME here, replace NAME with the name of your project).

|   +---NAME

As for what you are supposed to be accomplishing, nothing more than creating that folder structure. As for why it didn’t work, I told you in the post that (supposedly) you flagged off-topic.

1 Like

THANK YOU SO MUCH!! I I was fully thrown by the lib/name and that answer was idiot-proof enough for me to follow. Thank you kindly for breaking it down; extra thanks for the super-helpful visual!

A free service run by Zed A. Shaw for learncodethehardway.org.