MKDIR and RM needs unix-like most pertinent switches
Votes from Connect: 3
Original Date Submitted: 1/3/2015 6:07:28 AM
Handle: The Deeds
Site Name: PowerShell
Feedback ID: 1074131
Frequency: Always Happens
Regression: Yes, this happens in all previous versions
In bash, we say:
In Powershell, the equivalent is:
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.
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).
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.
Introduce -f switch to rm and -p to mkdir in vNext of powershell.
Internal BugId: 13174