How to find untracked files in a Perforce tree? (analogue of svn status)

David Joyner picture David Joyner · Aug 12, 2008 · Viewed 40.5k times · Source

Anybody have a script or alias to find untracked (really: unadded) files in a Perforce tree?

EDIT: I updated the accepted answer on this one since it looks like P4V added support for this in the January 2009 release.

Answer

tenpn picture tenpn · Jun 9, 2009

EDIT: Please use p4 status now. There is no need for jumping through hoops anymore. See @ColonelPanic's answer.

In the Jan 2009 version of P4V, you can right-click on any folder in your workspace tree and click "reconcile offline work..."

This will do a little processing then bring up a split-tree view of files that are not checked out but have differences from the depot version, or not checked in at all. There may even be a few other categories it brings up.

You can right-click on files in this view and check them out, add them, or even revert them.

It's a very handy tool that's saved my ass a few times.

EDIT: ah the question asked about scripts specifically, but I'll leave this answer here just in case.