Help output: what do they mean by this?

L

Lucvdv

PS C:\> Get-Help Remove-Item -detailed
[...]
PARAMETERS
[...]
-recurse <SwitchParameter>
Deletes the items in the specified locations and in all child
items of the locations.

The Recurse parameter in this cmdlet does not work properly.


Does anyone know what they mean exactly by that last sentence?

What does it not do properly?

Is it broken with intention to fix later?
Broken without any plans to be fixed?
Or "works, but not exactly how you'd expect"?
Or "works, but not in all providers"?


Or does is just mean that the preferred way to do 'rm -rf' is

dir -recurse | del - force

instead of

dir | del -recurse -force
 

My Computer

K

Krishna Vutukuri[MSFT]

Hi,

"Get-help remove-item" gives help informatation related to remove-item
cmdlet. PARAMETERS section describes the paramaters the cmdlet accepts. So
in this case remove-item has a parameter -recurse.

So,

del <directory> -recurse

will delete your directory.

Assumption: del is aliased to remov-item

PS C:\temp> get-alias del

CommandType Name
Definition
----------- ---- ----------
Alias del
Remove-Item


-Krishna[MSFT]
Windows PowerShell Team
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.

"Lucvdv" <[email protected]> wrote in message
news:[email protected]
> PS C:\> Get-Help Remove-Item -detailed
> [...]
> PARAMETERS
> [...]
> -recurse <SwitchParameter>
> Deletes the items in the specified locations and in all child
> items of the locations.
>
> The Recurse parameter in this cmdlet does not work properly.
>
>
> Does anyone know what they mean exactly by that last sentence?
>
> What does it not do properly?
>
> Is it broken with intention to fix later?
> Broken without any plans to be fixed?
> Or "works, but not exactly how you'd expect"?
> Or "works, but not in all providers"?
>
>
> Or does is just mean that the preferred way to do 'rm -rf' is
>
> dir -recurse | del - force
>
> instead of
>
> dir | del -recurse -force
 

My Computer

A

Adam Milazzo

Krishna Vutukuri[MSFT] wrote:
> Hi,
>
> "Get-help remove-item" gives help informatation related to remove-item
> cmdlet. PARAMETERS section describes the paramaters the cmdlet accepts. So
> in this case remove-item has a parameter -recurse.
>
> So,...


He's asking about this sentence in the help file:

"The Recurse parameter in this cmdlet does not work properly."

What do you mean by THAT???
 

My Computer

A

Andrew Watt [MVP]

On Fri, 10 Nov 2006 15:20:57 +0100, Lucvdv <[email protected]>
wrote:

>
> The Recurse parameter in this cmdlet does not work properly.
>
>
>Does anyone know what they mean exactly by that last sentence?


As far as I am aware it means exactly what it says. The -recurse
parameter doesn't work properly.

See
https://connect.microsoft.com/feedback/ViewFeedback.aspx?FeedbackID=87456&SiteID=99.

It hasn't been fixed in RC2 as far as I can see.

If you execute a command like the following on a directory hierarchy
which contains *.txt files at multiple levels remove-item only
recognises those files at one level.

remove-item C:\Disposable\* -include *.txt -recurse -whatif

At least it doesn't do what I would expect it to do.

But if you try

get-childitem C:\Disposable\* -include *.txt -recurse

that does recurse across *.txt files at multiple levels.

Andrew Watt MVP
 

My Computer

J

June Blender (MSFT)

Andrew's right. (I wrote the sentence, so I know for sure!)

This parameter has an effect, but it's not what you would expect, and
it's not particularly useful.

If I described the effect in the Help, users might use the parameter in
scripts, which would prevent us from fixing it. I also didn't want to
tell users what it "should do" if it didn't really do it, because you
might think you made an error. As usual, honesty is the best policy,
especially in docs.

It's definitely on our list of things to do, but I don't know when it
will be fixed. As you might imagine, we have a very long wish list.

I really appreciate hearing about any confusing stuff in the docs.
Thanks for posting!

--
June Blender [MSFT]
Windows PowerShell Documentation
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.



"Lucvdv" wrote:

> PS C:\> Get-Help Remove-Item -detailed
> [...]
> PARAMETERS
> [...]
> -recurse <SwitchParameter>
> Deletes the items in the specified locations and in all child
> items of the locations.
>
> The Recurse parameter in this cmdlet does not work properly.
>
>
> Does anyone know what they mean exactly by that last sentence?
>
> What does it not do properly?
>
> Is it broken with intention to fix later?
> Broken without any plans to be fixed?
> Or "works, but not exactly how you'd expect"?
> Or "works, but not in all providers"?
>
>
> Or does is just mean that the preferred way to do 'rm -rf' is
>
> dir -recurse | del - force
>
> instead of
>
> dir | del -recurse -force
>
 

My Computer

L

Lucvdv

On Wed, 15 Nov 2006 14:20:01 -0800, June Blender (MSFT)
<[email protected]_this_part_microsoft.com> wrote:

> It's definitely on our list of things to do, but I don't know when it
> will be fixed. As you might imagine, we have a very long wish list.


Thanks for the clarification.
 

My Computer

Top