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

P4 for Windows File Explorer Documentation | 2025.1

# P4 for Windows File Explorer

This User Guide provides an overview of P4 for Windows File Explorer, including its menu options and troubleshooting. P4 for Windows File Explorer enables you to perform P4 Server tasks on files in the context of your file browser (for example, File Explorer). For information about P4 Server, see the Documentation page of the Perforce Website.

## Connecting to P4 Server

To perform P4 Server version control actions on files in File Explorer, you must be connected to a P4 Server, also referred to as P4 Server, with a valid user and workspace See client workspace..

### Set Connection dialog configuration

The graphic user interface provides a convenient Set Connection dialog.

Enter the values for your Server, user name, and workspace, then click OK.

When you are connected, you can Log off by using the More... menu.

### Command-line configuration

If you do not want to use Set Connection dialog, consider the command-line alternatives.

You can set these connection variables in the Windows environment, per directory with a P4CONFIG file, or a combination of both. (Note that P4CONFIG files will override Windows environment settings for the current working directory.)

To set P4 Server variables in the Windows environment:

1. Open a command window.

2. Set the individual P4 Server variables with the following commands:

   - Server: `p4 set P4PORT=<server:port>`
   - User: `p4 set P4USER=<user_name>`
   - Workspace: `p4 set P4CLIENT=<workspace_name>`
3. Open File Explorer and navigate to a location under the workspace root defined by the workspace named in P4CLIENT.

To set P4 Server variables with P4CONFIG files:

1. Open a command window.

2. Set the P4 Server variable for P4CONFIG with the following command:

   - P4CONFIG: `p4 set P4CONFIG=<config_file_name>`

3. For each workspace root location on the local disk, create a file named `<config_file_name>`; inside the file add:

       #
       # P4 configuration file
       #
       P4PORT=<server:port>
       P4USER=<user_name>
       P4CLIENT=<workspace_name>

4. Open File Explorer and navigate to a location under a workspace root containing a P4CONFIG file.

Environment variables should be an adequate way to set connection settings if you are working with a single server, user, and workspace. If you have more than one workspace that you use on a regular basis, you may benefit from the flexibility of using P4CONFIG files.

For additional information, see:

- Windows Environment Variable Precedence
- Using Multiple Workspaces with P4 for Windows File Explorer

## Menu options

When you right-click a file in your file browser and select P4, P4 for Windows File Explorer displays some or all of the following menu options, depending on the state of the file.

Log In... | Enables you to enter your password and log in if you are not logged in to P4 Server and you have a password. If the server you are connecting to is configured with multi-factor authentication (MFA), you are prompted for another layer of verification. Depending on the setup, you may need to select a method of verification before you can enter your credentials. For more information, see `p4 login2` in the P4 CLI Reference. [P4VS-2753/P4V-23511/P4EXP-476] If the server you are connecting to is configured for authentication with P4 AS, the Identity Provider (IdP) web page opens, prompting you for the credentials registered with your Identity Provider (IdP). For details, see P4 Authentication Service Documentation or contact your P4 Server administrator.
Get Latest Revision | Retrieves the most recent version of a file in the depot A file repository hosted on the P4 Server. A depot is the top-level unit of storage for versioned files, which are also known as depot files, archive files, or source files. It contains all versions of all files ever submitted to the depot. Except for obliterated files, any version of any file can be restored, including deleted files, but not obliterated files. An installation can have multiple depots, and they might be of different types, such as a local depot and a stream depot..
Submit... | Checks in the default changelist The unnumbered pending changelist that is automatically created when a file is opened for add, edit, or delete.. A changelist The changes to files or stream specifications along with metadata, such as the list of changed files, their version numbers, who submitted the changelist to the depot, and the submitter's description of the changes. A changelist is the unit of versioned work. See also atomic change transaction and changelist number. contains details about the change you made to files in the depot.
Check Out | Opens the files for edit in your default changelist. A changelist logs the changes you make to files in the depot. After you have made your changes, you submit To send a pending changelist from the client workspace to the depot. the changelist.
Delete in P4 Server | [P4EXP-489]Removes selected files locally and marks them for delete in P4 Server. Depending on your preferences, P4 for Windows File Explorer prompts you for confirmation before it proceeds. Selecting the Don't confirm deletes in the future check box turns off the related preference. When you confirm, P4 for Windows File Explorer marks the files for delete in P4 Server and displays a confirmation message with the number of files marked for delete. Files marked for delete still exist in P4 Server. They are now included in a pending changelist A changelist that has not been submitted.. To complete the deletion process, you need to submit the changelist. To access the changelist, right-click and select Show in P4V or View Pending Changelists. Then, right-click the respective changelist and click Submit.
Add to Source Control | Adds the selected files to the default changelist. When you submit the changelist, the files are added to the depot. Only files that reside in directories in your workspace view can be added to a depot.
Revert | Discards all changes you have made to the file. P4 Server restores the head revision The most recent revision of a file within the depot. Because file revisions are numbered sequentially, this revision is the highest-numbered revision of that file. of the file from the depot to your workspace, overwriting any changes you have made. The file is no longer checked out.
Revert Unchanged Files | Closes unchanged files in a changelist. The files are no longer checked out.
View Pending Changelists | [P4V-391]Opens the Pending Changelists dialog, which lists all changelists that have not been submitted. This is helpful when you need to submit files that you marked for delete with the Delete in P4 Server option because such files no longer show in File Explorer.
Diff Against Have Revision | Launches your diff (noun) A set of lines that do not match when two files, or stream versions, are compared. A conflict is a pair of unequal diffs between each of two files and a base, or between two versions of a stream. (verb) To compare the contents of files or file revisions, or of stream versions. See conflict. utility to compare (diff) files in your workspace with files at the head revision in the depot to display any changes you have made.
File History | Displays the History dialog, which enables you to view any of the selected file's revisions, get a desired revision into your workspace, or compare two revisions of the same file.
Properties | Displays P4 Server information about a file.
Show in P4V | Opens P4V with the selected file highlighted.
Remove from Workspace | Removes files from your workspace. The files remain in the depot. To restore a file to your workspace, select the file in P4V and choose Get Latest Revision.
Refresh File State | Refreshes the state of the files under P4 Server control.
More | Set Connection: Displays the dialog for configuring a connection to your P4 Server. Connection Information: Displays information about your P4 Server connection.
Preferences: Enables you to configure P4 for Windows File Explorer as follows: Show file state icons: Select to display P4 Server icon overlays on individual files to indicate file state in the file browser, as follows: Green circle: The file is synced to head. Yellow triangle: The file is out of date. Red check: The file is in your changelist, opened for either add, edit, or delete. Prompt for confirmation of delete in P4 Server: Clear if you do not want P4 for Windows File Explorer to prompt you for confirmation when you try to delete a file in P4 Server. By default, this option is selected. [P4EXP-489] Show only error messages: Select to display only error messages from the server. By default, all server messages are displayed when you perform an action on a file. Enable logging to file: Select to log P4 for Windows File Explorer activity to the specified file. Name: Specify the name and location of the log file. Size: Specify the maximum size of the log file. Enable diagnostic logging: Select to turn on verbose debug logging for actions performed from P4 menu items.
Log Off: Logs you out if you have a password set in P4 Server.
Help: Displays this help page.

## Troubleshooting

If you experience issues viewing P4 for Windows File Explorer icons, this might be related to file overlay icon limitations on Windows. For more information and a workaround, see the article Inconsistent Icon Overlays with P4 for Windows File Explorer in the Perforce Knowledge Base.

Your search for returned results