Please feel free to provide feedback or file bugs here.

MKDIR and RM needs unix-like most pertinent switches

Votes from Connect: 3

Original Date Submitted: 1/3/2015 6:07:28 AM

********Contact Information********
Handle: The Deeds
Site Name: PowerShell
Feedback ID: 1074131

Frequency: Always Happens
Regression: Yes, this happens in all previous versions

Problem Description:
Part 1:

In bash, we say:

rm -f

In Powershell, the equivalent is:

rm -Force

Please add an alias -f, so to make it compatible with unix-like shells. It helps a lot in C/C++ CMAKE and other scripting scenarios like Nodejs etc.

Part 2:

We desperately need mkdir -p (or --parents) switch of Unix in Windows. Going by the man (manual);, it says:

"Create parent directories as necessary. When this option is used, no error is reported if a specified DIRECTORY already exists."

The emphasis on "no error is reported". This is EXTREMEMLY important in C/C++ make recipes.

Hope it will buzz into the ears at Redmond and will arrive in posh vNext.

Thanks in anticipation!

Product Studio item created by Connect Synchronizer due to creation of feedback ID 1074131 (

Repro Steps:
mkdir /temp; rm -rf /temp

-f is not a switch, instead use rm -r /temp -Force! Which is yuck!

mkdir -p /temp/and/then/some/non/existent/path

-p is unrecognized.

Expected Results:
Introduce -f switch to rm and -p to mkdir in vNext of powershell.

Internal BugId: 13174

1 vote
Sign in
Sign in with: Facebook Google
Signed in as (Sign out)

We’ll send you updates on this idea

AdminJoey Aiello [MSFT] (Program Manager, Windows Server) shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Sign in with: Facebook Google
Signed in as (Sign out)

Feedback and Knowledge Base