Support

Register your Product

Product Documentation

Knowledge Base

Contact Support

Community

User Group

Resources

Application Library

Flow Library

Script Library

Strip Prefix and Suffix

This script can be used to strip prefixes and suffixes from the job name. You can define which part of a file name needs to be removed by changing the "Prefix" and "Suffix" property on the script element.

Information

Supported by: PowerSWITCH (MAC and WIN)
Language: JavaScript

Description:

This script defines 2 properties: prefix and suffix.

These properties are added to the Script element when selecting this script and allow you to change the prefix and/or suffix text that needs to be removed, without having to change the actual script.

Each time a job arrives, the script will try to match the prefix with the beginning of the job name or the suffix with the end of the job name (extensions of files are excluded). If either one matches, the matching text will be removed from the Job's name.

Using this script

  • Download and save the script on your computer: download script.
  • Select the Script element in your PowerSWITCH flow and browse to the script in the Script package property.
    or
  • Open the script in the SWITCHscripter and change it to your needs.

Example flow

  • Sort on PitStop XML report content

    The XML preflight reports created by PitStop are picked up as metadata. This metadata is used to sort files in different folders depending on the type of errors that were found e.g. color, font or other errors.

© Copyright 2007 by Gradual Software.