You can list the contents of a project or a directory object version in a work area. By default, the output consists of a list of objects and their associated projections in the file system sorted in case-insensitive order of name.
About this task
ccm dir -p|-project [-m] ([-w] | [-f|-format format]) [-s] [-nf|-noformat]
([-ch|-column_header] | [-nch|-nocolumn_header])
[-sep|-separator separator] ([-sby|-sortby sortspec] |
[-ns|-nosort|-no_sort]) [-gby|-groupby groupformat] project_spec...
ccm dir [-m] ([-w] | [-f|-format format]) [-s] [-nf|-noformat]
([-ch|-column_header] | [-nch|-nocolumn_header])
[-sep|-separator separator] ([-sby|-sortby sortspec] |
[-ns|-nosort|-no_sort]) [-gby|-groupby groupformat]
[path_or_file_spec...]
- -ch|-column_header
- Specifies to use a column header in the output format. See -ch|-column_headers for details.
- -f|-format format
- Specifies the command output format. See -f|-format for details.
A keyword can be built-in (%fullname, %displayname, %objectname) or the name of any existing attribute such as %modify_time or %status.
See Built-In keywords for a list of keywords.
- -gby|-groupby groupformat
- Specifies how to group the command output. See -gby|-groupby for details.
- -m
- Shows both controlled and uncontrolled files and directories. If a user-defined format is not specified with the -f|-format option, the default format (short or long form) includes a column indicating the synchronization status for files as follows:
- Local copy (LC) - denotes files that are in the project, but have a local copy rather than a symbolic link in the work area. If files are displayed with this mark and your work area is link-based, perform a reconcile operation. For more information, see reconcile command.
- Not synchronized (NS) - denotes files that are in the project, but not in the work area. This situation occurs when you add files to the project, but your work area is not visible, or when the link or local copy of a file is deleted. If most of the files in your work area are displayed with this mark, perform a reconcile operation. For more information, see reconcile command.
- Uncontrolled (UC) - denotes files that are in the work area, but not in the project. To view uncontrolled files marked with UC, you must use the -m option with the -l option. In user-defined formats, use the %Sync keyword to show the synchronization status.
- -nch|-nocolumn_header
- Specifies not to use a column header in the output format. See -nch|-nocolumn_headers for details.
- -nf|-noformat
- Specifies not to use column alignment. See -nf|-noformat for details.
- -ns|-nosort|-no_sort
- Specifies that the command's output is not sorted. See -ns|-nosort for details.
- path_or_file_spec
- Specifies the path list. You can set the path_or_file_spec to a project, directory, or file defined in the database. This can also be an empty directory entry. If omitted, the current working directory is listed. See File specification for details.
- -p|-project
- Specifies that a project is listed.
- project_spec
- Specifies the project to list. See Project specification for details.
- -s
- Displays subdirectory members recursively. The command does not recurse into subprojects.
- -sby|-sortby sortspec
- Specifies how to sort the command output. See -sby|-sortby for details.
- -sep|-separator separator
- Used only with the -f|-format option. Specifies a different separator character. See -sep|-separator for details.
- -u|-unnumbered
- Suppresses automatic numbering of the command's output (that is, the output is un-numbered). See -u|-unnumbered for details.
- -w
- Specifies to use the default short-form. This shows the displayname of each object.
Example
- List the files that are not controlled
ccm dir -m
(UC) symlink _ccmwaid.inf
working john 6/20/08 4:05 PM ascii 1 a.txt-one 10
working john 6/20/08 4:06 PM ascii 1 b.txt-one 10
- List the current directory in the long format. (Files preceded by LC are local copy files.)
ccm dir
working john 6/20/08 4:05 PM ascii 1 a.txt-one 10
working john 6/20/08 4:06 PM ascii 1 b.txt-one 10
- In the current directory, list the file name and version for all objects.
ccm dir -w
ext_incl-1
incl-1
src-1
- In the current directory, show all members, including subdirectories.
ccm dir /s
integrate joe Jun 19 2008 dir J#1 include,2 J#5565
(LC) integrate bob Jan 26 15:41 makefile J15 Makefile.pc,#7 J#6103
released joe Jan 16 2006 dir J#12 src,1 J#120
include:
(LC) integrate pat Jan 26 15:42 makefile J#1 make_include.pc,13 J#6103
src:
(LC) integrate max Mar 27 2008 java J#1 Main.c,6 J#5339
- In the current directory, show the absolute paths for all objects.
ccm dir /f "%displayname %type %path"
a.txt-one ascii C:\ccm_wa\turn_3349\SubPrj-1\SubPrj\a.txt
b.txt-one ascii C:\ccm_wa\turn_3349\SubPrj-1\SubPrj\b.txt