Commands / Files

Move-Item

Move or rename by moving

beginner Files Aliases movemimv

Move-Item
 Move-Item -Path .\notes.txt -Destination .\archive\notes.txt
Works on
WindowsLinuxmacOS
PowerShell
5.1 and later
Reference
Microsoft Learn: Move-Item

Careful: Move-Item deletes the source. Use Copy-Item if you still need the original.

Moves a file or folder. If the destination is on the same drive, this is a rename/move. Across drives it copies then deletes.

Always pass -WhatIf the first time.

Try this

Move-Item -Path .\notes.txt -Destination .\archive\ -WhatIf

Coming from another shell

ShellWhat you might type
bash / zshmv notes.txt archive/
cmd.exemove notes.txt archive\

More in From bash and From cmd.

Related commands