Perforce 2005.1 Command Reference
<< Previous Chapter
p4 diff2
Table of Contents
Index
Perforce on the Web
Next Chapter >>
p4 edit

p4 dirs

Synopsis

List the immediate subdirectories of specified depot directories.

Syntax

p4 [g-opts] dirs [-C -D -H] depot_directory[revRange]...

Description

Use p4 dirs to find the immediate subdirectories of any depot directories provided as arguments. Any directory argument must be provided in depot syntax and must end with the * wildcard. If you use the "..." wildcard, you will receive the wrong results!

p4 dirs only lists the immediate subdirectories of the directory arguments. To recursively list all of a directory's subdirectories, call p4 dirs multiple times.

By default, only subdirectories that contain at least one undeleted file will be returned. To include those subdirectories that contain only deleted files, use the -D flag.

This command is meant to be used in scripts that call Perforce; it is unlikely that you'll have a need to call it from the command line.

Options

-C

Display only those directories that are mapped through the current client workspace view.

-D

Include subdirectories that contain only deleted files. By default, these directories are not displayed.

-H

Include only those directories that contain files on the current client workspace's p4 have list.

g-opts

See the Global Options section.

Usage Notes

Can File Arguments Use
Revision Specifier?

Can File Arguments Use
Revision Range?

Minimal Access Level Required

Yes

Yes

list

Examples

p4 dirs //depot/projects/*

Returns a list of all the immediate subdirectories of //depot/projects.

p4 dirs //depot/a/* //depot/b/*

Returns a list of all immediate subdirectories of //depot/a and //depot/b.

p4 dirs //depot/...

The "..." wildcard is not supported by p4 dirs.

Related Commands

To list all the files that meet particular criteria

p4 files

To list all depots on the current Perforce server

p4 depots


Perforce 2005.1 Command Reference
<< Previous Chapter
p4 diff2
Table of Contents
Index
Perforce on the Web
Next Chapter >>
p4 edit
Please send comments and questions about this manual to [email protected].
Copyright 1999-2005 Perforce Software. All rights reserved.
Last updated: 05/12/05