FILELIST VARA Objects
FILELIST VARA objects retrieve the file names of the files stored in a particular directory. When defining FILELIST VARA object, specifying an Agent is mandatory. On Windows Agents, file names are sorted in ascending order. On UNIX Agents, the file names are not sorted.
FILELIST VARA objects have contain one column; they do not have a result column. Keep this in mind when using the GET_PROCESS_LINE script element in relation with FILELIST VARA objects.
Use PromptSet variables here when you use the Dynamic Reload feature for combo box prompts. The PromptSet variables are resolved when the object that includes the PromptSet is executed.
Like any other objects, FILELIST VARAs have various definition pages. General, Version Management and Documentation are common to all objects. Here we describe the Variables page that is specific to FILELIST VARAs.
To Define a FILELIST VARA Object
-
In the Variable Settings section specify how the VARA object is going to access the target system from which it retrieves the values.
-
Select the OS Agentthat is used to access the directory. Agent Groups are not allowed. If you do not select anything, the Agent of the task that uses the VARA object is applied.
Notes:
- A runtime error occurs if the VARA object is used in an object to which no Agent or Login has been assigned.
- File Transfer object as source: If you do not assign an Agent, the Agent that is defined in the destination settings of the File Transfer object is used.
-
You can include PromptSet variables here when using the dynamic reload feature for combo box prompts. When you use PromptSet variables in a dynamic VARA object, the Preview feature returns an error. This is because the PromptSet variables do not exist in the dynamic VARA object. However, the PromptSet variables will be resolved when objects including the PromptSet are executed.
-
Select Apply Task Agent to use the Agent of the task that uses the VARA object instead. If the task does not have an Agent (this is the case of Script objects, for example), the Agent of the VARA object is used. If neither the VARA object nor the task has an Agent, an error occurs.
-
Select the Login object that allows the VARA object to access the target operation system.
-
Select Apply Task Login to use the Login object assigned to the task that uses the VARA object. If the task does not have a Login object assigned (this is the case of Script objects, for example), the Login assigned to the VARA object is used. If neither the VARA object nor the task has a Login object, an error occurs.
-
In Files enter the directory from which the file names should be returned as a value list when the VARA object is accessed. For example, on a Windows computer it could be:
C:\temp\*.*
You can also limit the list to files with a particular name or suffix. To set such filters, use "*" (several characters) or "?" (exactly one character). For example:
C:\utility\temp\*.txt
-
-
The content of FILELIST VARA objects is always a string, this is why its type is always Text. This is displayed in the Data & Formatting section and you cannot change it. In this section, you specify the data format of the value that is rendered by the VARA object. Do the following:
-
Select Limit Text Length to set a limit to the length of the character string.
-
In Max. text length specify the maximum length. Possible values: 1 to 1024
-
Select Force upper case if you want to convert the text of the first value column to upper case.
-
-
All VARA objects have a Script Access section on their definition pages that determines the error handling when scripts read the VARA object. In this section you decide what happens if scripts access the VARA object and the key to which they refer is not available.
You have the following options:
-
Return error
The script ends abnormally and a runtime error message is displayed in the Messages console
-
Return initial values (Default)
The script continues executing although the key is not available. No runtime error is displayed. The report contains an empty string indicating that no key has been found.
Tip: Ensure that the keys of VARA objects always return a value if you want to use this option.
-
-
Click the Preview button to validate the VARA object. This function checks whether the directory exists, if the Agent is available, if there is read access to the path, and so on. If the settings are correct, the file list is displayed.
-
To export the content of the preview table to a CSV file, click Export Table. All rows and column are exported. Use this function if you need to further process the content of the CSV file (paste it to a different application for further processing and so on).
-
To copy one or more rows in the Preview table, select the Copy button. The selected rows are copied to the clipboard and you can paste them to a third party tool (Google, Sheets, Excel, text editor, and so on).
Note: This function is available only if
https
is used on the Automic Web Interface . -
Save the object.
See also: