Move files in PowerShell with Move-Item (and -Force)

PowerShell's mv equivalent — moves or renames files and folders, with -Force to overwrite existing destinations.

WindowsFilespowershellmoveMedium risk
Use Move-Item -Path <source> -Destination <dest> and add -Force to overwrite a same-named file at the destination.

01Command

Command
$ Move-Item -Path 'C:\Temp\report.csv' -Destination 'D:\Reports\report.csv' -Force

02What it does

Move-Item handles both moving and renaming — renaming is just a move within the same directory. By default it refuses to overwrite an existing destination file, which is why scripts fail with 'Cannot create a file when that file already exists'; -Force removes that check. On the same volume a move is an instant metadata rename; across volumes it becomes a copy-then-delete.

03Risk

RiskMedium risk
RequirementsPowerShell
!Warning: -Force silently replaces the destination file — preview what will happen first with -WhatIf.

04Undo

Undo
$ Move-Item -Path 'D:\Reports\report.csv' -Destination 'C:\Temp\report.csv' -Force

05Sources

  • Move-Item - PowerShell
    SS64 · technical · 2026-09-17
    Evidence: SS64 describes -Force as forcing the command to run without asking for user confirmation, overwriting existing destination files.
  • Move-Item | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: Microsoft documents Move-Item with -Force to overwrite an existing destination item and -WhatIf to preview the move.

Last verified: 2026-09-17 · Category: Files & Folders

06Related solutions