Support

Register your Product

Product Documentation

Knowledge Base

Contact Support

Community

User Group

Resources

Application Library

Flow Library

Script Library

Sort on Job Size

This is an example script that shows how you can retrieve the size of a job (file or job folder) and use that to filter files into one or the other direction.

Information

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

Description:

This script uses 2 properties which are shows on the Script element after selecting this script.

  • argDirection
    Is shown as "Allow files that are" and allows you to choose between "smaller than" and "bigger than".
  • argSizeInKB
    The number you enter here is used to make the difference between the small and the big files.

These properties make the script a lot more portable; you can change the way the script works just by changing the values of these properties (without having to change the script).

The script only allows fail and success data connections. If the file matches the criteria it will be moved through the success connection and otherwise through the fail connection.

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 file size using script object

    This flow uses a Script element that sorts jobs based on their size.

© Copyright 2007 by Gradual Software.