Show TOC Start of Content Area

Background documentation count Locate the document in its SAP Library structure

Use

Counts the number of files which are present in a given directory and in all its subdirectories.

Syntax

Syntax

count [-depth|-d ...] [-pathRegexp|-r ...] [-noParents|-np] [-noChildren|-nc] [resource]

Options

 

-depth|-d

Controls how the result is reported. A depth of 0 defines that a single row is reported telling how many files under the directory are found. A depth of 1 defines that the same row is reported and additionally how many files are found in the direct subdirectories of the given directory. When the root resource was on path-level x then only counts for those resources on a path-level <= x+d are reported.

-pathRegexp|-r

Regular expression for the path of the files to be counted. Every file for which the path does not match this expression is not counted.

-noParents|-np

Prevents report of directories just because they are parent-directories of relevant directories.

-noChildren|-nc

Prevents report of directories when one of the parent-directory was already reported.

Arguments

 

resource

The path of the directory under which the files should be counted.

Description

Counts the files in a subtree.

Example

Counts the files in the workspace /ws/test/wsp.

count /ws/test/wsp

End of Content Area