-1

I am getting error while making the following directory in powershell

mkdir bin NAME tests docs

Here is the error:

A positional parameter cannot be found that accepts argument 'NAME'
2
  • 2
    What are you trying to create? Mkdir is an alias for New-Item. Type Help New-Item -Detailed for how to use this command Commented Oct 11, 2019 at 11:09
  • 1
    Did you try to create several dirs at once or do you expect a new directory "bin NAME tests docs"? Commented Oct 11, 2019 at 11:27

2 Answers 2

1

To create a new directory with PowerShell you should be using new-item

An example:

New-Item -Path "c:\" -Name "NAME\test\docs" -ItemType "directory"

Additional documentation found here

Sign up to request clarification or add additional context in comments.

Comments

1
mkdir bin NAME tests docs

instead, use comma separated name

mkdir bin, NAME, tests, docs

1 Comment

Did you try your suggested code? Please read output from Get-Command mkdir | Select-Object -ExpandProperty Definition

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.