Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Documentation | 2025.2

# Reconfigure a client workspace

You can reconfigure your client workspace if you want your files to be mapped to a different location on the local disk, or if the computer or host name of the workstation has changed.

## Prerequisites

1. If you want to change the root directory of your workspace, ensure that the new directory exists on your computer.

2. If you are going to change the computer host name of the workspace, run the p4 info command and record the Client host: field value so you can enter it when you edit the client workspace spec.

## Change the location of workspace files

1. Ensure that you have no files checked out by running p4 submit or p4 revert on any open files.

2. Remove the files from their old location in the workspace by running the p4 sync command in the correct way to delete local files:

   p4 sync ...#none

3. Make the changes:

   When referencing a classic depot A repository of P4 files that is not streams-based. Uses the Perforce file revision model, not the graph model. The default depot name is depot. See also 'stream depot' and 'graph depot'., run the p4 client command to open the client workspace spec, then edit the Host:, Root:, and\or View: fields, then save the spec, and close the spec.

   When referencing a stream depot A depot used with streams and stream clients. A stream depot has structured branching, unlike the free-form branching of other depot types. See also 'classic depot' and 'graph depot'.,

   Consult with an administrator before making changes to a stream spec because other users of that stream will be affected. The file locations under the client’s Root: directory are automatically determined by the stream specification’s PATHS: field. Modification of some of the path types defined in this field can change the location of files on all client workspaces associated with that stream. To learn more, see Update streams.

   1. If you want to change the Host: and\or Root: fields, run the p4 client command to open the workspace spec, make the edits, then save the spec, and close the spec.

   2. If you want to change the Path: field, run the p4 stream command to open the stream spec, then edit the Path: field, then save the spec, and close the spec.

4. Run p4 sync to copy the files from the depot to the new locations.

Your search for returned results