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 Server write permission for the specified files. For information about using wildcards with Helix Server files, see Helix Server wildcards.

For details about Helix 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.

Note

The p4 move command is renaming a file within the same directory, or moving a file between folders within the same directory tree. To learn how to restructure the depot by moving an entire branch, see the Knowledge Base article, "Renaming Depot Directories".