Repository: vscode
Issue: The file to paste has been deleted or moved. No actually, the target already exists.
Labels: bug,file-explorer

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->


<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- Searched "have been deleted or moved since you copied them" and got nothing. -->

<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- done. At first I denied clipboard access so got a clipboard error, but once I dismissed that error, the same paste error occured. Then once I gave clipboard access, the same paste error still occurred. -->

<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- Grabbed extra version info from there. Otherwise it was pretty empty. -->

<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes
<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->

Codespace:
- VS Code Version: 1.86.0-insider
    - Commit: 81725794264e4c0fddbc1b3b728013744ae90840
    - Embedder: codespaces
- OS Version: Ubuntu 20.04.6

I have the same issue locally using VSCodium:
- Version: 1.86.2.24053
- OS Version: Ubuntu 20.04.6

**Issue**

Contradictory error message when cutting-pasting a file and the target already exists:

> The file(s) to paste have been deleted or moved since you copied them. Unable to move/copy '***path***' because target '***new path***' already exists at destination.

Just to make sure I'm interpreting this correctly, I'm understanding "deleted or moved" to mean that *path* no longer exists, which is not the case. Although, maybe that's what's happening under the hood and this error is leaking a detail of the "cut" implementation.

**Steps to Reproduce:**

Setup for this example:

1. Create folder `some-folder`
2. Create file `some-file` in project root
3. Copy `some-file` into `some-folder`

    - or otherwise create `some-file` in `some-folder`

To get error:

1. Cut `some-file`
2. Try to paste `some-file` into `some-folder`
3. Error occurs:

    > The file(s) to paste have been deleted or moved since you copied them. Unable to move/copy '***repo path***/some-file' because target '***repo path***/some-folder/some-file' already exists at destination.

**Expected behavior**

Either:
- A clearer error, e.g.

    > Target already exists. Unable to move/copy '***repo path***/some-file' because '***repo path***/some-folder/some-file' already exists at destination.

- A dialog like you get when dragging and dropping `some-file` into `some-folder`:

    > A file or folder with the name 'some-file' already exists in the destination folder. Do you want to replace it?

**Screenshots**

![error on codespace](https://github.com/microsoft/vscode/assets/22385371/5538f60a-ebf8-4e9c-a1fc-581ee21e2d62)

**Additional context**

No error when copy-pasting. Instead, target is renamed: `some-file copy`.