File List Input Mode

File List Input Mode

Report:  File and Directory List Input Mode
Option:  -F
Compatible Options: RSM Option Cross Reference
Usage:  rsm -O"report.htm" -o -F"filelist.txt" 
Source:  C, C++, C# and Java

This input mode will process files and directories from a list. This mode is useful for performing a discrete set of file metrics. The list must be a text file with compliant the specified format. The -RL mode can be helpful in creating the file list.  Lines within the file beginning with the # sign will be considered as comments.

File Lists can also include the following file formats.
Text Files (See Formatting Below)
i.e. "c:\Program Files\MSquared\M2 RSM\rsm.exe" -F project.txt
(See formatting below)

Visual Studio 6.0

i.e. "c:\Program Files\MSquared\M2 RSM\rsm.exe" -F project.dsw
i.e. "c:\Program Files\MSquared\M2 RSM\rsm.exe" -F project.dsp

Visual Studio 2003 & 2005

i.e. "c:\Program Files\MSquared\M2 RSM\rsm.exe" -F project.sln
i.e. "c:\Program Files\MSquared\M2 RSM\rsm.exe" -F project.vcproj

Visual Studio 2008 & Beyond

i.e. "c:\Program Files\MSquared\M2 RSM\rsm.exe" -F project.sln

Note: If a path/file contains spaces, you must delimit the data with quotes.

Text File Format: 

Files must be the complete path and file name. 
i.e. c:\project\src\ 

Text File Directory Format: 
Directories must the the full path. The following parameters to the directory are required for descent of the directory. 
-r       Recursive descent of the directory 
-n       No Recursive descent 
c,h,cpp  Types string tells RSM which kind of files
         directory Starting point for processing 

i.e. -r java /proj/java/source 
     -n h,cpp /proj/cpp/source 

Environment Variable Expansion:
A line in the input file can expand environment variables to
enhance the flexibility in programming mode. The enviroment
variable must be in the format %ENVAR% in the file line.

i.e. -r h,cpp %PROJ%

This format is how RSM expands the environment variable regardless
of the operating system or shell used.

Example File:


-r h,c,cpp,java %PROJ%
-n java d:\javasrc\src\n"


No wild cards are valid in this mode. Blank lines are ignored.
Lines leading with a # character are not processed and considered comments.

# Example filelist.txt
# Lines starting with # are comments
# blanks lines are ok to use

# Process Directories with recursive decent
-r h,cpp d:\src\seahunt

# Process just the directory no recursice descent
-r -d java d:\src\rolodex

# Process Indiviual Files

# Expand environment variable PROJ and recurse the direcory
-r h,cpp %PROJ%

# No wild cards are valid in this mode