Question

In Perforce, how do I get a list of checked out files?

How do I get a list of the files checked out by users (including the usernames) using P4V or P4?

I want to provide a depot location and see a list of any files under that location (including sub folders) that are checked out.

 47  58397  47
1 Jan 1970

Solution

 34

From the command line:

p4 opened -a //depot/Your/Location/...

The ... indicates that sub folders should be included.

2008-09-25

Solution

 24

Seeing as you also asked about P4V and only had command line answers so far, here's what you do for P4V. The "Pending" pane gets you part way to what you want. Ensure the "User" and "Workspace" filters are cleared, and you'll get a list of all files grouped by changelist and client spec. Not as clean as the straight list of files you get when using the P4 command line as suggested by Iain and Mark, but may help in some situations.

An alternative is to create a custom menu in P4V that uses one of the command line solutions suggested. For example:

  1. Tools->Manage Custom Tools
  2. New
  3. Call it something e.g. Open files by user
  4. Check the "Add to applicable context menus"
  5. In Application field, browse to p4.exe
  6. In Arguments, type opened -a %D (the latter takes the currently selected depot path)
  7. Check the box to run in a console.

I'm sure you could fancy this up a bit if needed to filter the output.

2008-09-25