Lifecycle DocScript Functions in v5.0

Building Lifecycle Applications for v5.0



Adobe PDF Documents Functions

Function Description
[PDF.ConvertFromPS](filename)

Converts PostScript to PDF and is primarily used with the Virtual Print Driver as all documents are sent as a PostScript file.

Parameter(s)

  • filename - This would typically be the filename of the current document
[PDF.ConvertFromTIF](filename)

Converts TIF image files to PDF.

Parameter(s)

  • filename - Creates a PDF file with the same name as the filename passed in.
[PDF.ConvertFromTIF](filename, newfilename)

Converts TIF image files to PDF.

Parameter(s)

  • filename - Creates a PDF file with the newfilename passed in.
[PDF.ConvertToTIF](filename, multipage, compression)

Converts a PDF document to a TIFF image. Allows selection for a single or multi-page TIFF and compression.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
  • multipage - Either true (single-page) or false multi-page.
  • compression - Details the compression method for the target TIF file:
    • 1 - No compression
    • 2 - CCITTRLE
    • 3 - CCITTFAX3
    • 4 - CCITTFAX4
    • 5 - LZW
    • 7 - JPEG
    • PACKBITS- 32773
[PDF.ConvertToTIFEX](filename, outputfilename, username, password, xres, yres, bitcount, compression, quality, multipage, firstpage, lastpage)

Provides an advanced platform for PDF to TIFF conversion.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
  • outputfilename - TIF output filename.
  • username - The username if the PDF is protected.
  • password - The password if the PDF is protected.
  • xres - Horizontal output resolution of the TIF in DPI.
  • yres - Vertical output resolution of the TIF in DPI.
  • bitcount - Color bit depth of TIF file. 0 is black and white.
  • compression - Compression type of TIF file:
    • 1 - No compression
    • 2 - CCITTRLE
    • 3 - CCITTFAX3
    • 4 - CCITTFAX4
    • 5 - LZW
    • 7 - JPEG
    • PACKBITS- 32773
  • quality - Quality of compression 0-100. (100% is no compression)
  • grayscale - 1 for grayscale, 0 for color
  • multipage - 1 for multi-page TIF, 0 for single page
  • firstpage - Start page in PDF file to export to TIF. '1-' implies to export from the start of the document.
  • lastpage - Last page in PDF to export to.'-1' implies export to the end of the document.
[PDF.TextToPDF](text, filename)

Converts the text passed in to a file.

Parameter(s)

  • text - The text to be converted to PDF.
  • filename - The name of the resulting PDF file.
[PDF.TextFileToPDF](filename)

Converts the text file to PDF.

Parameter(s)

  • textfilename - Converts this text file to a PDF file of the same name.
[PDF.TextFileToPDF](filename, newfilename)

Converts the text file passed in with textfilename to a PDF file called newfilename.

Parameter(s)

  • textfilename - The name of the text file to be converted.
  • newfilename - The name of the resulting PDF file.
[PDF.AddText](filename, textstring, position, color)

Adds a text stamp to the PDF document.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
  • textstring - The text that needs to be added to the PDF.
  • position - The position on the PDF.
    • Default = 0
    • Top Left = 1
    • Top Center = 2
    • Top Right = 3
    • Right Center = 4
    • Right Bottom = 5
    • Bottom Center = 6
    • Left Bottom = 7
    • Left Center = 8
    • Center = 9
  • color - Represented in hex as shown below:
    • Red is 255. (x0000FF)
    • White is 0. (x000000)
    • Black is 16777215. (xFFFFFF)
    • Blue is 16711680. (xFF0000)
    • Green is 65280. (x00FF00)
[PDF.Split](filename, output folder name)

This is used in conjunction with docpages. The pages are split into separate files into the output folder name with the original filename appended with _<page no> (e.g. _1, _2 _3…._n).

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
  • output folder name - A path for the target PDF file.
[PDF.Split](filename, output file name, pages)

This is used in conjunction with docpages. The pages variable allows a specific page range to be extracted from the original documents and split into page files.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
  • output folder name - A path for the target PDF file.
  • pages - The range of pages to split.
    • 2- : Will extract page 2 on wards.
    • -2 : Will extract everything up to page 2.
    • 1-10 : Will extract pages 1 to 10.
    • 2 : Extracts page 2.
[PDF.Split](filename)

This is used in conjunction with docpages. The pages are split into the same folder with the original filename appended with _<page no> (e.g. _1, _2 _3…._n).

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
[PDF.Combine](destination filename, filename1, filename2….filename n)

Combines PDF documents together. This function combines all the files specified to the file specified in filename.

Parameter(s)

  • filename - variable can also contain a page range within the PDF. In this instance the filename1 would become an array where the first position is the filename and the subsequent elements:
    • 2- : Will extract page 2 on wards
    • -2 : Will extract everything up to page 2
    • 1-10 : Will extract pages 1 to 10
    • 2 : Extracts page 2
[PDF.NoOfPages](filename)

Returns the number of pages in the specified PDF filename.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}
[PDF.GetText](filename, textmode, pages)

Retrieves the text from a PDF file.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
  • textmode - The textmode defines how the pages are returned. The default is false which returns the text as a string. Setting the textmode to true returns the text in an array, an element for each page.
  • pages - The pages variable allows a specific page range to be referenced:
    • 2- : Will extract page 2 on wards.
    • -2 : Will extract everything up to page 2.
    • 1-10 : Will extract pages 1 to 10.
    • 2 : Extracts page 2.
[PDF.SaveText](filename, textfilename, pages)

The performs a similar function to GetText, except all the text is saved to the specified textfilename. The textfilename and pages are optional. If not specified then the textfilename will be the original PDF filename with the extension replaced to .txt. The pages defaults to all pages.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
  • pages - The pages variable allows a specific page range to be referenced:
    • 2- : Will extract page 2 on wards.
    • -2 : Will extract everything up to page 2.
    • 1-10 : Will extract pages 1 to 10.
    • 2 : Extracts page 2.
[PDF.Repair](filename, destination filename)

This function repairs the structure of a PDF file.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
  • destination filename - The destination filename of the repaired PDF file.
[PDF.Break](filename, arrayofpagestobreakon, includebreakpage)

Returns an array of pages that determine where the breaks are in the document.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
  • arrayofpagestobreakon - An array that contain the page nos. to break the PDF file on.
  • includebreakpage - This indicates whether the break page will be kept. 1 indicates that the break page will be kept and 0 indicates the break page will be deleted.
[PDF.Remove](filename, pageparameter)

Removes the pages in the PDF specified in filename.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.

*pageparameter - Can either be a single page or an array of pages. The function creates a new PDF with the pages removed and return the file name.

[PDF.Splice](filename, pageparameter)

Breaks up a PDF file specified in filename with the page range specified in pageparameter. Returns an array of new PDF filenames.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
  • pageparameter - An array of pages.
    • {pageparameter[0]} = 1
    • {pageparameter[1]} = 4
    • {pageparameter[2]} = 6
[PDF.Redact](pdf filename,regex)

This function performs a redaction on the PDF image for the text found in the supplied regex search expression. For example, if you set the regex search expression to be a credit card number format, the function will search and tag credit card numbers, calculate the position (x,y pixels) and then apply the redaction based on the coordinates returned. The PDF can be secured to the redaction and unlderying text cannot be accessed.

Parameter(s)

  • pdf filename - Typically this would be the filename of the current document {fdocname}
  • regex - A regex expression to search and identify the text to be redacted.

Adobe PDF Forms Functions

Function Description
[PDF.GetFieldNames](filename)

Returns array of field names.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
[PDF.GetFieldValues](filename)

Returns array of field values corresponding to field names returned from GetFieldNames.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
[PDF.GetFieldValue](filename, fieldname)

Returns field value for the field name passed in the fieldname parameter.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
  • fieldname - PDF form field name to retrieve.

Microsoft Excel Documents (via OLE DB) Functions

Function Description
[Excel.Open](filename, version)

Opens the excel file to be read. Version is optional. Values are ‘5.0’,’6.0’,7.0’,’8.0’. Default is ‘8.0’.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
  • version - The version number of the Excel spreadsheet being used.
[Excel.Close]() Closes the currently opened Excel spreadsheet. (Only one can be open at a time).
[Excel.WorksheetCount](filename, version)

Returns the number of worksheets in the excel file. If file is already opened filename is optional. Version is optional. Values are ‘5.0’,’6.0’,7.0’,’8.0’. Default is ‘8.0’.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
  • version - The version number of the Excel spreadsheet being used.
[Excel.RowCount](filename, worksheetname, version)

Returns the number of used rows in a worksheet. If file is already opened filename is optional. Version is optional. Values are ‘5.0’,’6.0’,7.0’,’8.0’. Default is ‘8.0’.

Parameter(s)

  • worksheetname - The name of the worksheet in the Excel workbook.
  • filename - Typically this would be the filename of the current document {fdocname}.
  • version - The version number of the Excel spreadsheet being used.
[Excel.ColumnCount](filename, worksheetname, version)

Returns the number of used columns in a worksheet. If file is already opened filename is optional. Version is optional. Values are ‘5.0’,’6.0’,7.0’,’8.0’. Default is ‘8.0’.

Parameter(s)

  • worksheetname - The name of the worksheet in the Excel workbook.
  • filename - Typically this would be the filename of the current document {fdocname}.
  • version - The version number of the Excel spreadsheet being used.
[Excel.CellValue](sheetname, cell, filename, version)

Returns the value at the cell (A1,B5 etc) on the worksheet. If file is already opened filename is optional. Version is optional. Values are ‘5.0’,’6.0’,7.0’,’8.0’. Default is ‘8.0'.

Parameter(s)

  • cell - The target cell in the workbook (e.g. A5).
  • worksheetname - The name of the worksheet in the Excel workbook.
  • filename - Typically this would be the filename of the current document {fdocname}.
  • version - The version number of the Excel spreadsheet being used.
[Excel.CellRange](filename, cellstart, cellend, worksheetname, version)

Returns a multi-dimensional array of values between the start cell (A1,B5 etc) and the end cell on the worksheet. The start cell should be the top left of the range; the end cell should be the bottom right of the range. If file is already opened filename is optional. Version is optional. Values are ‘5.0’,’6.0’,7.0’,’8.0’. Default is ‘8.0'.

Parameter(s)

  • cellstart - The target start cell in the workbook (e.g. A5).
  • cellend - The target start cell in the workbook (e.g. A5).
  • worksheetname - The name of the worksheet in the Excel workbook.
  • filename - Typically this would be the filename of the current document {fdocname}.
  • version - The version number of the Excel spreadsheet being used.

Microsoft Word Documents Functions

Function Description
[Word.GetWordFile]() Returns the file name that will be used.
[Word.SetWordFile](filename)

Sets the file name that will be used. (Required).

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
[Word.Open](filename)

Sets and opens the file. (Optional).

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
[Word.Close]() Closes the file after use. (Required).
[Word.TotalPages]() Returns the number of pages in the Word file.
[Word.GetSinglePage](pagenumber)

Returns the content of a specific page.

Parameter(s)

  • pagenumber - Page number.
[Word.GetAllPages]() Returns the content of all pages.

Text Document Functions

Function Description
[Text.GetTextFile]() Returns the file name that will be used.
[Text.SetTextFile](filename)

Sets the file name that will be used. (Required).

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
[Text.Close]() Closes the file after use. (Required).
[Text.GetAllText]() Returns all the text in the file.
[Text.GetText](startpos, count)

Returns a portion of the text file, specifying the start position and number of characters.

Parameter(s)

  • startpos - The start position of the text.
  • count - The number of characters of the text.
[Text.TotalChars]() Returns the total number of characters in the text file.

Barcode Functions

Function Description
[Barcode.IsValidFileFormat](filenameext) Checks whether the file extension is a valid format. DocScript can read barcodes on either TIFF or PDF images files.
[Barcode.ReadPatch](boolval)

Set the barcode type as a patch code.

PatchCode.jpg
[Barcode.ReadCode11](boolval)

Sets the barcode type as Code 11.

Code11.jpg
[Barcode.ReadCode39](boolval)

Sets the barcode type as Code 39.

code39.jpg
[Barcode.ReadCode128](boolval)

Sets the barcode type as Code 128.

code128.jpg
[Barcode.ReadCodaBar](boolval)

Sets the barcode type as CodaBar.

codabar.jpg
[Barcode.ReadInter2of5](boolval) Sets the barcode type as Inter2of5.
[Barcode.ReadEAN13](boolval)

Sets the barcode type as EAN13.

EAN13.jpg
[Barcode.ReadEAN8](boolval)

Sets the barcode type as EAN8.

EAN8.jpg
[Barcode.ReadUPCE](boolval) Sets the barcode type as UPCE.
[Barcode.ReadAdd2](boolval)

Sets the barcode type as Add2.

Add2.png
[Barcode.ReadAdd5](boolval)

Sets the barcode type as Add5.

Add5.png
[Barcode.ReadDataMatrix](boolval)

Sets the barcode type as Data Matrix.

DataMatrix.jpg
[Barcode.ReadQRCode](boolval)

Sets the barcode type as QR Code.

QRCode.jpg
[Barcode.ReadPostNet](boolval)

Sets the barcode type as PostNet Code.

PostNet.png
[Barcode.ReadRM4SCC](boolval)

Sets the barcode type as RM4SCC Code.

RM4SCC.png
[Barcode.ReadUPCA](boolval)

Sets the barcode type as UPCA Code.

UPCA.png
[Barcode.SetAllFormatsTo](boolval) Sets all formats to be read. Care must be taken when using this option as it will reduce performance.
[Barcode.ScanRight](boolval) Scans barcode from right to left of the page.
[Barcode.ScanLeft](boolval) Scans barcode from left to right of the page.
[Barcode.ScanUp](boolval) Scans barcode from the bottom to the top of the page.
[Barcode.ScanDown](boolval) Scans barcode from the top to the bottom of the page.
[Barcode.ThresholdLevel](intval) Default to 0, variation in the accuracy of the scan.
[Barcode.ScanInterval](intval) Used in conjunction with Threshold and determines the scan interval.
[Barcode.SetReadArea](X,Y,Width,Height) Sets the scan area of a barcode. This is used if the process is picking up other barcodes on the page. This function specifies a specific area to read the barcode. Parameter values are in pixels.
[Barcode.BarcodesToRead](numberofbarcodestoread) Sets the number of barcodes to read.
[Barcode.SetAllDirectionsTo](boolval) Sets all directions. Care must be taken when using this option as it will reduce performance.
[Barcode.Read](filename) Reads the barcode once the rules are set.
[Barcode.SetDespeckle](value) Set value to 1 to despeckle each page before detecting barcodes. Set value to 0 to not despeckle. The default is 0. Warning: May improve detection percentage on degraded images, but will decrease recognition speed.
[Barcode.SetDilate](value) Set value to 1 to dilate each page before detecting barcodes. Set value to 0 to not detect. The default is 0. Warning: May improve detection percentage on degraded images, but will decrease recognition speed.
[Barcode.SetErode](value) Set value to 1 to erode edges on each page before detecting barcodes. Set value to 0 to not erode edges. The default is 0. Warning: May improve detection percentage on degraded images, but will decrease recognition speed.
[Barcode.SetInvert](value) Set value to 1 to invert each page before detecting barcodes. Set value to 0 to invert. The default is 0. Warning: May improve detection percentage on degraded images, but will decrease recognition speed.
[Barcode.SetSharp](value) Set value to 1 to sharpen each page before detecting barcodes. Set value to 0 to not do this. By default is 0. Warning: May improve detection percentage on degraded images, but will decrease recognition speed.
[Barcode.SetRenderMode] (value, dpi) Set value to ‘RENDER’ to re-render each page at the dpi specified. This may improve detection performance if the page image dpi is less than 200dpi. Set value to ‘IMAGE’ to use the page image. In ‘IMAGE’ mode dpi is ignored. The render mode is set to ‘IMAGE’ by default. Warning: ‘RENDER’ mode is slower that ‘IMAGE’ mode.
[Barcode.SetFilter](filter1,….,filterN) Set one or more regex filters. Barcode.GetPages will only return barcodes whose contents match one or more of the filters.
[Barcode.AddFilter](filter1,….,filter) Add one or more regex filters. Barcode.GetPages will only return barcodes whose contents match one or more of the filter.
[Barcode.ClearFilter]() Remove all barcode regex filters.
[Barcode.GetPages](filename)

Returns an array of pages that the barcode was found.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
[Barcode.GetOrientations](filename)

Returns an array of orientations for the barcodes found.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
[Barcode.ReadAndGetPages](filename)

Returns a 2 dimensional array pages and the symbology of the detected barcodes.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}.
[Barcode.FilterRepeats]()

Set to either 1 or 0.

1 - find the same barcode more than it just gives the first one.
0 - returns all barcodes.


TIFF Image Processing Functions

Function Description
[TIF.Split](tiff filename)

Splits to the TIFF file and returns an array of filenames for each page. The tiff files will be in the same location as the original TIFF capture.

Parameter(s)

  • tiff filename - Typically this would be the filename of the current document {fdocname}.
[TIF.AddText](tiff filename, text, leftoffset, bottomoffset)

Allows text to be added to TIFFs.

Parameter(s)

  • tiff filename - Typically this would be the filename of the current document {fdocname}.
  • text - The text to add to the TIF.
  • leftoffset - The offset from the left of the page.
  • bottomoffset - The offset from the bottom of the page.
[TIF.AddText](tiff filename, text, leftoffset, bottomoffset, textcolor)

Allows text to be added with color (only applies to color TIFFs). Color can be an int or a string. If a string can be a color name (eg. red) OR 'r,g,b' integers.

Parameter(s)

  • tiff filename - Typically this would be the filename of the current document {fdocname}.
  • text - The text to add to the TIF.
  • leftoffset - The offset from the left of the page.
  • bottomoffset - The offset from the bottom of the page.
  • textcolor - Color code for the added text.
[TIF.AddText](tiff filename, text, leftoffset, bottomoffset, textcolor, textfont)

Allows font to also be added.

Parameter(s)

  • tiff filename - Typically this would be the filename of the current document {fdocname}.
  • text - The text to add to the TIF.
  • leftoffset - The offset from the left of the page.
  • bottomoffset - The offset from the bottom of the page.
  • textcolor - Color code for the added text.
  • textfont - Font for the added text.
[TIF.Combine](inputfilenames, outputfilename, byteorder)

Combines TIFF pages together. Uses byteorder 0 = Intel, all others are Motorola.

Parameter(s)

  • inputfilenames - An array of TIF filenames to be combined.
  • outputfilename - The name of the resulting TIF file.
  • byteorder - Specifies the TIF byte order.
[TIF.TIFtoPDF](tiff filename)

Returns the name of the converted PDF file.

Parameter(s)

  • tiff filename - The name of the source TIFF file.
[TIF.NoOfPages](tiff filename)

Returns the number of pages in the specified TIFF filename.

Parameter(s)

  • tiff filename - Typically this would be the filename of the current document {fdocname}
[TIF.Splice](tiff filename, arrayofpages)

This function "splices" a TIFF file based on the array of pages. If item in the arrayofpages array is a comma separated list of pages. The function returns an array of spliced filenames. By default the files are placed in the same location as the source file.

Parameter(s)

  • tiff filename - Typically this would be the filename of the current document {fdocname}
  • arrayofpages - An array of pages, with each array element being a comma separated list of pages.
[TIF.Splice](tiff filename, arrayofpages, outputpath)

This function "splices" a TIFF file based on the array of pages. If item in the arrayofpages array is a comma separated list of pages. The function returns an array of spliced filenames. The files are placed in the path specified by the outputpath parameter.

Parameter(s)

  • tiff filename - Typically this would be the filename of the current document {fdocname}
  • arrayofpages - An array of pages, with each array element being a comma separated list of pages.
  • outputpath - The output location of the spliced files.
[TIFF.Redact](tiff filename,regex)

This function performs a redaction on the TIFF image for the text found in the supplied regex search expression. For example, if you set the regex search expression to be a credit card number, the function will search and tag credit card numbers, calculate the position (pixels) and then apply the redaction based on the coordinates returned. The redaction cannot be removed from the image.

Parameter(s)

  • tiff filename - Typically this would be the filename of the current document {fdocname}
  • regex - A regex expression to search and identify the text to be redacted.

OCR Processing Functions

In addition to the function below documents can also be OCR'd in batch using the OCR Connector.

Function Description
[AOCR.ToPDF](filename) OCRs and returns the text to a DocScript variable.

Database Functions

Function Description
[Access.Open](filename)

Opens the access file to be read.

Parameter(s)

  • filename - The name of the source TIFF file.
[Access.Query](query, filename)

Executes the query (e.g. SELECT* FROM [Customers] and returns a multi-dimensional array of results. The filename parameter is optional if the Access database is already opened by using the [Access.Open] function.

Parameter(s)

  • query - SQL based query.
  • filename - The name of the source Access file.
[Access.RowCount](filename, tablename)

Returns the number of rows in the specified table.

Parameter(s)

  • filename - The name of the source Access file.
  • tablename - The name Access table.
[Access.ColumnCount](filename, tablename)

Returns the number of columns in the specified table.

Parameter(s)

  • filename - The name of the source Access file.
  • tablename - The name Access table.
[Access.Close]() Closes the currently opened access database file.
[ODBC.Open](connectionstring)

ODBC database connection using the connection string. Eg. “dsn=….;Uid=….;Pwd=…”.

Parameter(s)

  • connectionstring - The database connection.
[ODBC.Query](query, connectionstring)

Executes the query (eg. SELECT * FROM Customers and returns a multi-dimensional array of results. If the connection is already opened connectionstring is optional.

Parameter(s)

  • query - SQL based query.
  • connectionstring - The database connection.
[ODBC.Close]() Closes the currently opened ODBC database connection.
[SQL.Open](connectionstring)

Opens an SQL server database connection using the connection string. Eg. “datasource=….;User=….;Password=…..;IntialCatalog=….”.

Parameter(s)

  • connectionstring - The database connection.
[SQL.Query](query, connectionstring)

Executes the query (eg. SELECT * FROM Customers and returns a multi-dimensional array of results. If the connection is already opened connectionstring is optional.

Parameter(s)

  • query - SQL based query.
  • connectionstring - The database connection.
[SQL.Close]() Closes the currently opened SQL server database connection.

Database Lookups Functions

The database lookups are performed automatically once setup in the index configuration data source tab.


File Analysis Functions

Function Description
[File.FullName](filename)

Returns the full filename (path, filename and extension).

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}, but can be any file on the system.
[File.Length](filename)

Returns the number of bytes in the file.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}, but can be any file on the system.
[File.Name](filename)

Returns the name of the file without the path, but with the extension.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}, but can be any file on the system.
[File.IsPowerPoint](filename)

Returns True if the file is a Microsoft PowerPoint file. Does not use the file extension. Instead it analyzes the files contents.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}, but can be any file on the system.
[File.IsWord](filename)

Returns True if the file is a Microsoft Word file. Does not use the file extension. Instead it analyzes the files contents.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}, but can be any file on the system.
[File.IsExcel](filename)

Returns True if the file is a Microsoft Excel file. Does not use the file extension. Instead it analyzes the files contents.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}, but can be any file on the system.
[File.IsPDF](filename)

Returns True if the file is a Adobe PDF file. Does not use the file extension. Instead it analyzes the files contents.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}, but can be any file on the system.
[File.IsTIF](filename)

Returns True if the file is a TIFF image file. Does not use the file extension. Instead it analyzes the files contents.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}, but can be any file on the system.
[File.IsTxt](filename)

Returns True if the file is a Text file. Does not use the file extension. Instead it analyzes the files contents.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}, but can be any file on the system.
[File.IsPS](filename)

Returns True if the file is a PostScript or Encapsulated PostScript file. Does not use the file extension. Instead it analyzes the files

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}, but can be any file on the system.contents.
[File.IsXML](filename)

Returns True if the file is an XML file. Does not use the file extension. Instead it analyzes the files contents.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}, but can be any file on the system.
[File.IsHTML](filename)

Returns True if the file is an HTML file. Does not use the file extension. Instead it analyzes the files contents.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}, but can be any file on the system.
[File.IsJPG](filename)

Returns True if the file is a JPEG image file. Does not use the file extension. Instead it analyzes the files contents.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}, but can be any file on the system.
[File.IsGIF](filename)

Returns True if the file is a GIF image file. Does not use the file extension. Instead it analyzes the files contents.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}, but can be any file on the system.
[File.IsRTF](filename)

Returns True if the file is a Rich Text Format file. Does not use the file extension. Instead it analyzes the files contents.

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}, but can be any file on the system.
[File.GetType](filename)

Returns the file type. The following file formats are supported:
* Microsoft Office (PowerPoint, Word, Excel, Access, including Word2007, Word2007MacroEnabled, WordTemplate, Word2007Template, Word2007TemplateMacroEnabled, Excel2007, Excel2007MacroEnabled, Excel2007Template, ExcelTemplate, PowerPoint2007, PowerPointTemplate, PowerPoint2007Template)
* Documentum's ApplicationXtender Foreign File Format
* PDF, TIF, TXT, HTML, XML, JPG, GIF, RTF, PostScript,
* Image Formats: Bitmap, PNG, ZIP, Outlook, Email,
* Video Formats: WindowsMediaAudio, WindowsMediaVideo, Quicktime, MPEG4, MP4Audio, MP4Video, MPEG, MP3, WAV, AVI

Parameter(s)

  • filename - Typically this would be the filename of the current document {fdocname}, but can be any file on the system.

Files and Directory Functions

Function Description
[File.Copy](sourcefilename, destinationfilename, overwrite)

File copy function. The overwrite variable is optional, by default it is True.

Parameter(s)

  • sourcefilename - This can be any file on the system.
  • destinationfilename - The destination filename.
  • overwrite - Overwrite the file if it already exists.
[File.Exists](filename)

Determine whether a file exists. Returns True or False.

Parameter(s)

  • filename - This can be any file on the system.
[File.Move](sourcefilename, destinationfilename)

Moves a file from the source to destination locations.

Parameter(s)

  • sourcefilename - This can be any file on the system.
  • destinationfilename - The destination filename.
[File.Replace](sourcefilename, destinationfilename, backupfilename, ignoremetadataerrors)

Replaces the contents of the specified file with the contents of another file, deleting the original file and creating a backup of the replaced file and optionally ignores merged errors.

Parameter(s)

  • sourcefilename - This can be any file on the system.
  • destinationfilename - The destination filename.
  • backupfilename - TBD.
  • ignoremetadataerrors - TBD
[File.Delete](filename)

Deletes specified file.

Parameter(s)

  • filename - This can be any file on the system.
[File.DirectoryName](filename)

Returns files directory path.

Parameter(s)

  • filename - This can be any file on the system.
[File.Extension](filename, ignoreextenstion)

Returns the files extension. eg ".tif" ".pdf". IgnoreExtension is optional, by default it is False. If True the function will analyze the file contents to determine the extension.

Parameter(s)

  • filename - This can be any file on the system.
  • ignoreextenstion - Analyze the text in the filename or the content to get the extension.
[File.Length](filename)

Returns the length of the filename.

Parameter(s)

  • filename - This can be any file on the system.
[File.Name](filename)

Returns the filename, removing the path.

Parameter(s)

  • filename - This can be any file on the system.
[File.NameWoExt](filename)

Returns the name of the document without the path and extension.

Parameter(s)

  • filename - This can be any file on the system.
[File.ReadAllBytes](filename)

Reads the contents of file (binary).

Parameter(s)

  • filename - This can be any file on the system.
[File.ReadAllLines](filename)

Returns an array of lines.

Parameter(s)

  • filename - This can be any file on the system.
[File.ReadAllText](filename)

Returns a string of text.

Parameter(s)

  • filename - This can be any file on the system.
[File.WriteAllLines](filename, lines)

Writes all lines in an array of lines.

Parameter(s)

  • filename - This can be any file on the system.
  • lines - The array of text lines to be written.
[File.WriteAllText](filename, textstring)

Write a string of text.

Parameter(s)

  • filename - This can be any file on the system.
  • textstring - The text string to write to the file.
[File.AppendAllText](filename, textstring)

Appends the text to the specified file.

Parameter(s)

  • filename - This can be any file on the system.
  • textstring - The text string to append to the file text.
[File.CreatedDate](filename)

Returns the date the file was created.

Parameter(s)

  • filename - This can be any file on the system.
[File.ModifiedDate](filename)

Returns the date the file was modified.

Parameter(s)

  • filename - This can be any file on the system.
[File.AccessedDate](filename)

Returns the date the file was modified.

Parameter(s)

  • filename - This can be any file on the system.
[File.RenameOnDup](filename)

If file exists, then it will return a new filename with '_' and a sequence number appended.

Parameter(s)

  • filename - This can be any file on the system.
[File.DeleteAll](filename(s))

Deletes the list of files in the filename(s) parameter.

Parameter(s)

  • filename(s) - A list a filenames separated by a semi-colon.
[File.Locked](filename)

Checks whether the filename is locked. Returns 1 if locked, 0 if unlocked.

Parameter(s)

  • filename - This can be any file on the system.
[File.StripFF](filename)

Strips form-feeds from the file.

Parameter(s)

  • filename - This can be any file on the system.
[File.MD5Hash](filename)

Returns the MD5 hash of the file.

Parameter(s)

  • filename - This can be any file on the system.
[Dir.Create](directoryname)

Creates a directory.

Parameter(s)

  • directoryname - The name of the directory to create.
[Dir.Exists](directoryname)

Returns True if the directory exists, otherwise returns False.

Parameter(s)

  • directoryname - The name of the directory to check.
[Dir.GetDirectories](directoryname)

Gets the names of the directories (including their paths).

Parameter(s)

  • directoryname - The name of the directory to retrieve the sub-directories from.
[Dir.GetDirectories](directoryname, searchpattern)

Gets the names of the directories (including their paths) that match the specified search pattern in the current directory, and optionally searches all sub directories.

Parameter(s)

  • directoryname - The name of the directory to retrieve the sub-directories from.
  • searchpattern - The directory search pattern.
[Dir.GetDirectories](directoryname, searchpattern, all)

Returns an array of sub-directories below the directoryname directory that match the search pattern. If All is true will below the top-level sub-directories, otherwise will only search in the top-level.

Parameter(s)

  • directoryname - The name of the directory to retrieve the sub-directories from.
  • searchpattern - The search pattern.
  • all - Indicates whether to include sub-directories below the first level.
[Dir.GetFiles](directoryname)

Returns an array of files below the directoryname directory.

Parameter(s)

  • directoryname - The name of the directory to retrieve the file from.
[Dir.GetFiles](directoryname, searchpattern)

Returns an array of files below the directoryname directory that match the searchpattern.

Parameter(s)

  • directoryname - The name of the directory to retrieve the file from.
  • searchpattern - The search pattern of the files.
[Dir.GetFiles](directoryname, searchpattern, all)

Returns an array of files below the directoryname directory that match the searchpattern. If All is True will below the top-level files, otherwise will only search in the top-level.

Parameter(s)

  • directoryname - The name of the directory to retrieve the files from.
  • searchpattern - The search pattern.
  • all - Indicates whether to include sub-directories below the first level.
[Dir.Move](sourcedirectory, destinationdirectory)

Moves a directory and its contents to the destination.

Parameter(s)

  • sourcedirectory - The name of the directory to move.
  • destinationdirectory - The destination path.

Regular Expression Functions

Function Description
[Regex.GetValueFromRegex](string, regexpattern)

Returns the first value found by the regexpattern in the string.

Parameter(s)

[Regex.GetValuesFromRegex]((string, regexpattern)

Returns all the values found by the regexpattern in the string.

Parameter(s)


String Functions

Function Description
[String.Split](sourcestring, splitstring, removeemptyvalues)

Splits a string into an array. If the third parameter is set to true then blank values will be removed from the array.

Parameter(s)

  • sourcestring - The string to split.
  • splitstring - The value to split by.
  • removeemptyvalues - Removes empty values from the array.
[String.Length](sourcestring)

Returns the length of a string.

Parameter(s)

  • sourcestring - The string to determine the length.
[String.Substring](sourcestring, startpos, length)

Returns a sub-string based on the start position and the length.

Parameter(s)

  • sourcestring - The source string that contains the sub-string.
  • startpos - The start position of where the sub-string starts.
  • length - The length of the sub-string.
[String.Substring](sourcestring, startpos)

Returns a sub-string based on the start position to the end of the string.

Parameter(s)

  • sourcestring - The source string that contains the sub-string.
  • startpos - The start position of where the sub-string starts.
[String.Trim](sourcestring)

Trims the string.

Parameter(s)

  • sourcestring - The source string.
[String.LTrim](sourcestring)

Trims the values to the left of the string.

Parameter(s)

  • sourcestring - The source string.
[String.RTrim](sourcestring)

Trims the values to the right of the string.

Parameter(s)

  • sourcestring - The source string.
[String.ToUpper](sourcestring)

Converts string to upper case.

Parameter(s)

  • sourcestring - The source string.
[String.ToLower](sourcestring)

Converts string to lower case.

Parameter(s)

  • sourcestring - The source string.
[String.Item](sourcestring, index)

Returns a character out of a string based on the position.

Parameter(s)

  • sourcestring - The source string.
  • index - Position in the string.
[String.IndexOf](sourcestring, searchstring, startpos)

Returns a characters out of a string based on a search string at the specified start position.

Parameter(s)

  • sourcestring - The source string.
  • searchstring - The search string.
  • startpos - The position in the string to start searching.
[String.IndexOf](sourcestring, searchstring)

Returns a characters out of a string based on a search string from the beginning of the string.

Parameter(s)

  • sourcestring - The source string.
  • searchstring - The search string.
[String.Contains](sourcestring, searchstring)

Returns true or false if the string contains the search string.

Parameter(s)

  • sourcestring - The source string.
  • searchstring - The search string.
[String.FindBetween](searchstring, starttoken, endtoken, recurse)
[String.FindBetween](searchstring, starttoken, endtoken)

Extracts one or more strings that are found in between the start and end token. For example, if the search string is *The dog said, "Woof"*, and the starttoken and endtoken are " and ", then FindBetween

would return *Woof*. If recurse is true it will search the whole searchstring and return all instances in an array. If securse is false it will only return the first instance. If no instances are found it will return "" or an empty array.

Parameter(s)

  • searchstring - The search string.
  • starttoken - The start string token.
  • endtoken - The end string token. You can also specify EOL to get all the text to the end of the current line.
  • recurse - This is optional and is used to search for multiple occurrences.
[String.ContainsNumeric](searchstring)

Returns true if the string contains any numeric number (0-9)..

Parameter(s)

  • searchstring - The search string.
[String.ContainsAlpha](searchstring)

Returns true if the string contains any alpha character (a-z;A-Z).

Parameter(s)

  • searchstring - The search string.
[String.ToSSN](ssnwithnodashes)

Takes a 9 digit SSN and reformats it to contain dashes. eg. If input is 123456789, it will return 123-45-6789.

Parameter(s)

  • ssnwithnodashes - The Social Security Number string with no dashes.
[String.Replace](string, oldvalue, newvalue)

Replaces the oldvalue with the newvalue in string.

Parameter(s)

  • string - The source string that contains the string to replace.
  • oldvalue - The string value to replace.
  • newvalue - The new string value.
[String.PadLeft](string, totalwidth, paddingchar)

Pads the string from the left with paddingchar for the totalwidth.

Parameter(s)

  • string - The source string to pad.
  • totalwidth - The length of the padding.
  • paddingchar - The character to pad the string with.
[String.PadRight](string, totalwidth, paddingchar)

Pads the string from the right with paddingchar for the totalwidth.

Parameter(s)

  • string - The source string to pad.
  • totalwidth - The length of the padding.
  • paddingchar - The character to pad the string with.
[String.MakeFilename](string)

Remove illegal filename chars and replaces them with tags.

Parameter(s)

  • string - The filename string.
[String.UnMakeFilename](string)

Add the illegal filename chars and replaces them with the original characters.

Parameter(s)

  • string - The source string to add the illegal characters back in to.
[String.PadDecimal](value)

Will return the decimal string value padded with 2 decimal places. Eg. 10 will return 10.00. 5.5 will return 5.50. 6.78 will return 6.78.

Parameter(s)

  • value - The source value.
[String.PadDecimal](value, numdecimalplaces)

Return the decimal string value padded with numdecimalplaces decimal places.

Parameter(s)

  • value - The source value.
  • numdecimalplaces - The number of decimal places to pad.
[String.HighestNumber](values1, …., valuesN)

Will return the highest number in the parameters. There must be at least one parameter. A parameter can be an array or a single value.

Parameter(s)

  • value(s) - Comma separated list of values.
[String.LowestNumber](values1, …., valuesN)

Will return the lowest number in the parameters. There must be at least one parameter. A parameter can be an array or a single value.

Parameter(s)

  • value(s) - Comma separated list of values.
[String.SplitPages](pagetext)

Will split an OCR text file, generated by the OCR, into an array of pages.

Parameter(s)

  • pagetext - The OCR text.
[String.Combine](delimiter ,values1,….,valuesN)

Will return the combination of the value parameters, separated by delimiter. Each value parameter can be a single value or an array. Eg. [String.Combine](‘|’,’10’,’20’,’30’) will return 10|20|30.

Parameter(s)

  • delimiter - The delimiter.
  • value(s) - Comma separated values to combine.
[String.FindAround](text, findtag)

Will search text for findtag. If findtag is found it will return a block of text, around findtag, 2 lines above and two lines below. It will return the first block it finds.

Parameter(s)

  • text - The source text that includes the find tag text.
  • findtag - The string tag to locate.
[String.FindAround](text, findtag, linesabovetag, linesbelowtag, charactersleft, charctersright, recurse)

Will search text for findtag. If findtag is found it will return a block of text, around findtag, of the dimensions below:

Parameter(s)

  • text - The source text that includes the find tag text.
  • findtag - The string tag to locate.
  • linesabovetag - Specified the lines above.
  • linesbelowtag - Specified the lines below.
  • charactersleft - Specified the lines to the left.
  • charactersright - Specified the lines to the right. If charactersleft is -1, then the block will go to the start of the line. If charactersright is -1, then the block will go to the end of the line.
  • recurse - This will continue to search the text.
[String.ToTitleCase](sourcestring)

Converts the string to title case. For example, "war and peace" converts to "War and Peace".

Parameter(s)

  • sourcestring - The source string.
[String.SQuote](sourcestring)

Encloses the string in single quotes.

Parameter(s)

  • sourcestring - The source string.
[String.GetTagContents](xmlstring, tagname, recurse)

Returns an array of value of a tag within an XML formatted search string.

Parameter(s)

  • xmlstring - The XML text.
  • tagname - The tag name within the XML string.
  • recurse - Will continue the search once the first instance of the tag is found.
[String.ContainsDups](stringarray)

Returns a true of false depending on whether duplicates strings are found in the string array passed in.

Parameter(s)

  • stringarray - An array of string values.
[String.ReplaceIllegalFileCharacters](filenamestring, replacewithchar)

Replaces illegal filename characters with replacewithchar.

Parameter(s)

  • filenamestring - The string of the filename.
  • replacewithchar - The character to replace the illegal filename characters with. If this left blank then the illegal characters are removed.
[String.ReplaceSysVars](string)

If you pass in a string the contains system variables in curly brackets. The function will replace the strings with the associated System Variables values.

Parameter(s)

  • string - The string that contains the system variables.

Array Functions

Function Description
[DocuNECT.SetVar](varname, varvalue, indexno)

Sets the array element variable with the name of varname, at the position of indexno, to the value of varvalue.
Support multi-dimensional arrays:
[DocuNECT.SetVar](varname, varvalue, indexnoA,indexnoB,….indexnoZ)

Parameter(s)

  • varname - The name of the variable.
  • varvalue - The value to set the variable to.
  • indexno - This allows a specific array value to be set.
[DocuNECT.SetVar](varname, varvalue)

Sets the variable with the name of varname, to the value of varvalue.

Parameter(s)

  • varname - The name of the variable.
  • varvalue - The value to set the variable to.
[DocuNECT.GetVar](varname)

Returns the variable named varname.

Parameter(s)

  • varname - The name of the variable.
[DocuNECT.GetVar](varname, indexno)

Returns the array element variable named varname, at the position of indexno.

Parameter(s)

  • varname - The name of the variable.
  • indexno - This allows a specific array value to be retrieved.

Date/Time Functions

Function Description
[DateTime.Year]() Returns the current year.
[DateTime.Month]() Returns the current month. 1 - 12.
[DateTime.DOM]() Returns the current day of the month. 1 - 31.
[DateTime.DOY]() Returns the current day of the year. 1 - 365.
[DateTime.DOW]() Returns the current day of the week. (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday).
[DateTime.Hour]() Returns the current hour. 0 - 23.
[DateTime.Minute]() Returns the current minute. 0 - 59.
[DateTime.Second]() Returns the current second. 0 - 59.
[DateTime.Millisecond]() Returns the current millisecond. 0 - 999.
[DateTime.Ticks]() Returns the current tick on the PC.
[DateTime.Now]() Returns the current date and time as a string. (Month/Day/Year Hour:Minute:Second).
[DateTime.Today]() Returns the current date as a string: Month/Day/Year.
[DateTime.TimeOfDay]() Returns the current time as a string: Hour:Minute:Second.
[DateTime.UTCNow]() Returns the current UTC date and time as a string: Month/Day/Year Hour:Minute:Second.
[DateTime.ReformatDateTime](datetimestring, newformat)

Will convert the datetimestring to the new format.
Note You can use any custom .NET style date and time format string. See http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx for more information.

Parameter(s)

  • datetimestring - The date/time string.
  • newformat - The target date/time format.
[DateTime.ReformatDateTime](datetimestring, oldformat, newformat)

Will convert the datetimestring which uses the old format to the new format.
Note You can use any custom .NET style date and time format string. See http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx for more information.

Parameter(s)

  • datetimestring - The date/time string.
  • oldformat - The existing date/time format.
  • newformat - The target date/time format.
[DateTime.Compare](date1, date2)

Returns 0 if dates are the same; -1 if date1 is earlier; +1 if date1 is later.

Parameter(s)

  • date1 - The first date to compare.
  • date2 - The second date to compare.
[DateTime.Same](date1,date2)

Returns 0 if the dates are tge same; -1 if date1 is earlier; +1 if date1 is later.

Parameter(s)

  • date1 - The first date to check.
  • date2 - The second date to check.
[DateTime.Earlier](date1, date2)

Returns 0 if date1 is later; 0 if both the same; 1 if date1 is earlier.

Parameter(s)

  • date1 - The first date to check.
  • date2 - The second date to check.
[DateTime.EarlierOrSame](date1, date2)

Returns 0 if date1 is later; 1 if both the same; 1 if date1 is earlier.

Parameter(s)

  • date1 - The first date to check.
  • date2 - The second date to check.
[DateTime.Later](date1, date2)

Returns 1 if date1 is later; 0 if both the same; 0 if date1 is earlier.

Parameter(s)

  • date1 - The first date to check.
  • date2 - The second date to check.
[DateTime.LaterOrSame](date1, date2)

Returns 1 if date1 is later; 1 if both the same; 0 if date1 is earlier.

Parameter(s)

  • date1 - The first date to check.
  • date2 - The second date to check.
[DateTime.AddYears](TBD)

Adds a specified number of years to the date/time passed in.

Parameter(s)


User and Role Routing Functions

Function Description
{docusername} Used to route specific documents to a user. {docusername} = '<username>'.
{docrolename} Used to route specific documents to a user role. {docrolename} = '<rolename>.

Email Functions

Function Description
[Email.Send](To, Message, Subject, Attachments, From, CC, BCC)

Sends a text email using the SMTP server defined in the DocuNECT Web Properties.

Parameter(s)

  • To – Who to send the email to. To specify more than one address use an array or one string with each address delimited by a semi-colon. This parameter is required.
  • Message – The message body. Must be a string. This parameter is required.
  • Subject – The subject header of the email. This parameter is required.
  • Attachments – List of file file paths to attach to the email. If more than one attachment can use an array or one string with each attachment path delimited by a semi-colon. This parameter is optional.
  • From – The address of the sender. This parameter is optional and if not used, the sender will be the cmsadmin email address..
  • CC - Who to cc the email to. If more than one address can use an array or one string with each address delimited by a semi-colon. This parameter is optional.
  • BCC - Who to bcc the email to. If more than one address can use an array or one string with each address delimited by a semi-colon. This parameter is optional.
[Email.SendHTML](To, Message, Subject, Attachments, From, CC, BCC)

Sends an HTML email using the SMTP server defined in the DocuNECT Web Properties.

Parameter(s)

  • To – Who to send the email to. To specify more than one address use an array or one string with each address delimited by a semi-colon. This parameter is required.
  • Message – The message body. Must be a string. This parameter is required.
  • Subject – The subject header of the email. This parameter is required.
  • Attachments – List of file file paths to attach to the email. If more than one attachment can use an array or one string with each attachment path delimited by a semi-colon. This parameter is optional.
  • From – The address of the sender. This parameter is optional and if not used, the sender will be the cmsadmin email address..
  • CC - Who to cc the email to. If more than one address can use an array or one string with each address delimited by a semi-colon. This parameter is optional.
  • BCC - Who to bcc the email to. If more than one address can use an array or one string with each address delimited by a semi-colon. This parameter is optional.

ZIP Functions

Function Description
[ZIP.ExtractAllZip](zipfilename)

Returns number of files extracted and extracts the ZIP contents to the same folder as the source ZIP file.

Parameter(s)

  • zipfilename – The name of the ZIP file.
[ZIP.ExtractAllZip](zipfilename, todirectory)

Returns number of files extracted and extracts the ZIP contents to the supplied folder.

Parameter(s)

  • zipfilename – The name of the ZIP file.
  • todirectory – The path to extract the files to.
[ZIP.ExtractFromZIP](zipfilename, filenametoextract)

Returns the name of the file extracted and extracts the file to the same folder as the source ZIP file. The file will be extracted to the same location as the ZIP file.

Parameter(s)

  • zipfilename – The name of the ZIP file.
  • filenametoextract – The specifc filename to extract.
[ZIP.ExtractFromZIP](zipfilename, filenametoextract, todirectory)

Returns the name of the file extracted and extracts the file to the supplied folder.

Parameter(s)

  • zipfilename – The name of the ZIP file.
  • filenametoextract – The specifc filename to extract.
  • todirectory - The path to extract the files to.
[ZIP.GetZipFiles](zipfilename)

Returns an array of the ZIP file contents.

Parameter(s)

  • zipfilename – The name of the ZIP file.
[ZIP.AddtoZIP](zipfilename, filenametoadd)

Adds a file to a ZIP file.

Parameter(s)

  • zipfilename – The name of the ZIP file.
  • filenametoadd - Filename to add to the ZIP file.

FTP Functions

Function Description
[FTP.Open](hostname, portno, username, password, startfolder)

Opens an FTP site.

Parameter(s)

  • hostname – The FTP address or IP address.
  • portno – The FTP site port no.
  • username – The username of the FTP site.
  • password – The password of the FTP site.
  • startfolder – Folder the FTP site will connect to. If left blank, the root folder will be used.
[FTP.Upload](filename, uploadfolderpath, thrownexception)

Upload a file to an FTP site.

Parameter(s)

  • filename – The name of the file to upload.
  • uploadfolderpath – The target FTP folder path.
  • thrownexception – Stores the exception if there is an error uploading to the FTP site.
[FTP.Close]() Closes the FTP site.

Separation Functions

Function Description
[Sep.RemoveTPatches](filename)

Removes the T-Patches from the document specified in the filename.

Parameter(s)

  • filename – The name of the file to remove the T-Patches from.

Template Processing Functions

Function Description
[Template.GetConfidenceLevel](doctext)

This applies the templates defined in the Lifecycle Template Rules CDT table.

The CDT table has the following structure:

TemplatesTable.jpg

Parameter(s)

  • doctext – The text of the document, either extracted from the native document or via OCR.
{results} = [Template.GetConfidenceLevel]({docText})

while ({CategoryName} not= 0)
{CategoryName} = [DocuNECT.GetVar]('results',{templateCounter},0)
{SubCategoryName} = [DocuNECT.GetVar]('results',{templateCounter},1)
{ConfidenceLevel} = [DocuNECT.GetVar]('results',{templateCounter},2)
            {templateCounter} = {templateCounter} + 1
…
…
end

General Functions

Function Description
[DocuNECT.Log](logmessage)

This write a message to the connector log.

Parameter(s)

  • logmessage – The text message to be written to the log.
[DocuNECT.GetCurrentUser] Returns the service account name of the Windows for the DocuNECT server.
[DocuNECT.GetMachineName] Returns the machine name of the DocuNECT server.
[DocuNECT.NetUse](localdevicename, remotedevicename, domain, user, password)

Allows a netuse command to executed within a lifecycle.

Parameter(s)

  • localdevicename – Specifies the name of the server and the shared resource. If localdevicename contains spaces, use quotation marks around the entire computer name from the double backslash (\\) to the end of the computer name (for example, "\\Computer Name\Share Name"). The computer name can be from 1 to 15 characters long
  • // remotedevicename// – Specifies a NetWare volume on the server. You must have Client Service for NetWare installed and running to connect to NetWare servers
  • domain – Specifies another domain. If you omit DomainName, net use uses the current logged on domain.
  • user – Specifies the user name with which to log on.
  • password – Specifies the password with which to log on.