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

Description:
********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); http://www.computerhope.com/unix/umkdir.htm, 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 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=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
(thinking…)
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 →

0 comments

Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base