Perforce Utilities

Written by Robert Cowham (Perforce Consulting Partner and Trainer).

Here are some example utility scripts which I have found useful from time to time. They are provided with no warranty - use at your own risk! Have a quick look inside to see parameters etc.

Visual Source Safe (VSS) Scripts

A bit hacky (e.g. env stuff still hard coded in) but shows example of how to use VSS OLE Automation from Perl. They tend to be recursive and take a single parameter which is VSS path to start from, e.g.

vss_deleted_files.pl "$/project 1/subdir"
vss_deleted_files.pl      A script to print out a list of VSS files and directories which are marked as deleted.
vss_illegal_filenames.pl      Prints out VSS files that are "illegal" as far as Perforce is concerned (e.g. have @, #, *, % or unprintable chars in their name).
vss_linked_files.pl      A script to print out a list of linked (shared or branched) files in a VSS repository.

Other Utilities

specsaver.rb A branch of Tony Smith's script - updated for Ruby 1.8 - does automated versioning of various spec entities (e.g. client specs, branch specs, labels etc).
p4checkpoint.pl     A branch of Sandy Currier's script to do checkpoints and backups. Enhance to do verifies and email the results.
SaveLabels.pl An (old) script which stores the contents of labels as text files in Perforce. Left for posterity but specsaver.rb above does this better!
CreateClient.pl A simple script to create clients from others copying over other stuff as well as just the views (e.g. options). Again, somewhat dated these days.

Last updated: $Date: 2003/12/03 $