Table of Contents
To illustrate the ability to query the Project Control File (PCF), this HowTo will discuss iterating across a set of directories and reporting whether or not the project is a GSM or 3DBM.
The following script will iterate through the given directory (defaulting to the current working directory). Open every PCF, and report whether or not that PCF is a GSM or 3DBM file. The original source can be found at rptpcftype.py.
In this script we use the os.path.walk [1] function from Python to iterate through all the directories starting at the given startDir, and attempt to open up any file that matches the "*10.*" pattern"
[1] | "os.path" Python Library Reference. 21 December 2001. 23 November 2007. <http://www.python.org/doc/2.2/lib/module-os.path.html#l2h-1290> |