Skip to content

Remove-Item reports incorrect number of removed items in the progress bar #23875

Description

@kborowinski

Prerequisites

Steps to reproduce

  1. Use Remove-Item on any folder with substantial number of test files that you can delete.
  2. Cmdlet will report incorrect number of removed items in the progress bar.

It's either off-by-one on the total item count or on the currently removed item 🤷‍♂️

obo-snapshot

Expected behavior

Correct number of removed items should be reported in the progress bar

Actual behavior

Removed 4 of 3 files [...]
Removed 11 of 10 files [...]

Error details

No error

Environment data

Name                           Value
----                           -----
PSVersion                      7.5.0-preview.3
PSEdition                      Core
GitCommitId                    7.5.0-preview.3-21-gbfa3dbe20db2758aa2abbbdd26166cf803893076
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0, 5.0, 5.1, 6.0, 7.0}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

obo

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productWG-Interactive-Consolethe console experienceWG-ReviewedA Working Group has reviewed this and made a recommendation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions