Rename and move files
To rename or move files, you must first open them for add or edit, and
then use the p4 move
command:
C:\bruno_ws> p4 move source_file target_file
To move groups of files, use matching wildcards in the
source_file and target_file specifiers. To move files, you
must have
Helix Core Server write
permission for the specified files. For information
about using wildcards with
Helix Core Server
files, see
Helix Core Server wildcards.
For details about Helix Core Server permissions, see the Helix Core Server Administrator Guide.
When you rename or move a file using p4 move
, the
versioning service creates an integration record that links it to its
deleted predecessor, preserving the file’s history. Integration is also
used to create branches and to propagate changes.
The p4 move command renames a file within the same directory, or moves a file between folders within the same directory tree. To learn how to restructure the depot by moving an entire branch, see the Perforce Knowledge Base article, Renaming Depot Directories.