PhenixID

Read File

Version: 1.4

Category: Input

Extended Category: Files

Action Package: Extended Actions

Description

Reads a file and puts the file content in a session attribute. The file type (‘text’/’bin’) is indicated in the attribute ‘fileType’. If the file attribute is absent, the action does nothing.

ParameterDescriptionExample
File Name[Optional]
The name, including full path, for the file to read.
Supports SESSION() and GLOBAL().
Default: SESSION(file).
c:\files\SESSION(user).txt
File Type[Optional]
Controls how files are interpreted. If ‘bin’, the file contents attribute will be binary format. If ‘text’, the file contents attribute will be string format. If ‘auto’, the file contents will be determined based on the file name extension.
Defaults to ‘auto’.
bin
Text File Encoding[Optional]
Controls how string contents is decoded. The parameter specifies a string encoding scheme, e.g. ‘utf-8’, ‘us-ascii’ or ‘iso8859-1’. If set to ‘auto’, the default platform encoding is used.
Defaults to ‘auto’.
us-ascii
Text File Extensions[Optional]
Controls which file extensions that indicate that the file contents is text format. The parameter specifies a comma separated list of extensions, e.g. ‘txt,xml,html,properties’.
Defaults to ‘txt,xml,html’.
xml
Archiving Directory[Optional]
A directory to where processed files are copied. Archived files get the file name suffixed with a date/time stamp. If the parameter is left empty, files will not be archived.
c:\archive
Archiving File Name[Optional]
Sets an alternative file name when archiving the file. The parameter supports SESSION(fileName) where fileName could be e.g. ‘myPictureFile.jpg’.
Defaults to fileName + yyyyMMdd-HHmmss.
SESSION(sAMAccountName).txt
Delete File (true/false)[Optional]
If ‘true’, the original file will be deleted after processing.
Defaults to ‘false’.
true
File Content Attribute[Optional]
The name of the session attribute where the file content will be stored.
Default: fileContents.
userFile

Use Cases

Example 1: Read photos from folder

This action will read photos from a folder.

ParameterValue
File NameSESSION(file)
File Typebin
Text File Encoding[BLANK]
Text File Extensions[BLANK]
Archiving DirectoryC:\Download\Pictures\Processed Files
Archiving File Name[BLANK]
Delete File (true/false)[BLANK]
File Content Attribute[BLANK]

DISCLAIMER
Information provided in this document is for your information only. PhenixID makes no explicit or implied claims to the validity of this information. Any trademarks referenced in this document are the property of their respective owners.

The origin of this information may be internal or external to PhenixID. PhenixID makes all reasonable efforts to verify this information.

PhenixID - support.phenixid.se