move-item
Move or rename files, directories, registry keys, and other PowerShell data items. tldr-pages
On Windows
Windows
Move or rename files, directories, registry keys, and other PowerShell data items. This command can only be run through PowerShell.
Rename a file or directory when the target is not an existing directory
Move-Item path\to\source path\to\targetIdentifyMove a file or directory into an existing directory
Move-Item path\to\source path\to\existing_directoryIdentifyRename or move file(s) with specific name (do not treat special characters inside strings)
Move-Item -LiteralPath "path\to\source" path\to\file_or_directoryIdentifyMove multiple files into an existing directory, keeping the filenames unchanged
Move-Item path\to\source1 , path\to\source2 ... path\to\existing_directoryIdentifyMove or rename registry key(s)
Move-Item path\to\source_key1 , path\to\source_key2 ... path\to\new_or_existing_keyIdentifyDo not prompt for confirmation before overwriting existing files or registry keys
mv -Force path\to\source path\to\targetIdentifyPrompt for confirmation before overwriting existing files, regardless of file permissions
mv -Confirm path\to\source path\to\targetIdentifySimulate moving files, showing the files and directories which could be moved without executing them
mv -WhatIf path\to\source path\to\targetIdentify