fileWrite operation in the post-job event to write a new line to a log file:
Operations
- Copy a File
- Create a File
- Delete a File
- List all Files
- Create a Directory
- Move a File
- Read a file
- Read a Line in File
- Write to a File
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
fileWrite operation in the post-job event to write a new line to a log file:
<api:info title="After Run" desc="This event is fired after running a job.">
<input name="JobName" required="true" desc="The name of the job being executed." />
<input name="Source" required="true" desc="The name of source connection." />
<input name="Destination" required="true" desc="The name of destination connection." />
<input name="JobStatus" required="true" desc="The status of the completed run."/>
<input name="Query#" required="true" desc="An array containing each query that was executed." />
<input name="QueryStatus#" required="true" desc="An array containing the status of each query that was executed." />
</api:info>
<api:set attr="file.file" value="C://mylog.log"/>
<api:set attr="file.data" value="[null | now()]: The Job [_input.jobname] completed with a status of [_input.jobstatus]"/>
<api:set attr="file.mode" value="truncate"/>
<api:call op="fileWrite" in="file"/>
| Required Input Attribute | Description |
|---|---|
| source | The name of the file that is to be copied. |
| destination | The name of the file after it is copied. |
| Optional Input Attribute | Description |
|---|---|
| force | If force is set to true, the operation creates missing directories. The allowed values are true and false. The default value is true. |
| mask | The pattern that is used to select the entries that are to be copied. The default value is *. |
| recurse | Recursively copy files and directories. In this case, the destination is assumed to be a directory. The allowed values are false and true. The default value is false. |
| Output Attribute | Description |
|---|---|
| file:source | The full path of the source file. |
| file:destination | The full path of the destination file. |
| Required Input Attribute | Description |
|---|---|
| file | The name of the file that is to be created. |
| Optional Input Attribute | Description |
|---|---|
| force | If force is set to true, the operation creates missing directories. The allowed values are true and false. The default value is true. |
| data | The data that is to be written in the file. |
| mode | The mode of writing. The allowed values are truncate and append. The default value is truncate. |
| encoding | The encoding of the file. The default value is UTF-8. |
| Output Attribute | Description |
|---|---|
| file:file | The full path of the file that is created. |
| file:cdate | The creation date of the file. |
| Required Input Attribute | Description |
|---|---|
| file | The name of the file or directory that is to be deleted. |
| Output Attribute | Description |
|---|---|
| file:file | The name of the file or directory that is deleted. |
| Required Input Attribute | Description |
|---|---|
| path | The path whose directories and files will be listed. The default value is .. |
| Optional Input Attribute | Description |
|---|---|
| mask | The pattern that is used for filtering the result entries. The default value is *. |
| recurse | To list entries recursively. The allowed values are false and true. The default value is false. |
| fileordir | To list only files or directories. The allowed values are all, files, and dirs. The default value is all. |
| Output Attribute | Description |
|---|---|
| file:fullname | The full path of the file or directory in the current entry. |
| file:name | The name of the file or directory in the current entry. |
| file:mtime | The time at which the file or directory in the current entry is written to. |
| file:ctime | The time at which the file or directory in the current entry is created. |
| file:atime | The time at which the file or directory in the current entry is last read from or written to. |
| file:attributes | A list of attributes of the file or directory in the current entry. |
| file:extension | The extension of the entry. |
| file:size | The size of the file in bytes. |
| file:isdir | Whether the entry is a file or a directory. |
| Required Input Attribute | Description |
|---|---|
| path | The path of the directory that is to be created. |
| Optional Input Attribute | Description |
|---|---|
| force | If force is set to true, the operation creates missing directories. The allowed values are true and false. The default value is true. |
| Output Attribute | Description |
|---|---|
| file:path | The directory that is created. |
| file:cdate | The creation date of the directory. |
| Required Input Attribute | Description |
|---|---|
| source | The source path that is to be moved. |
| destination | The destination that is to be moved to. |
| Optional Input Attribute | Description |
|---|---|
| force | If force is set to true, the operation creates missing directories. The allowed values are true and false. The default value is true. |
| Output Attribute | Description |
|---|---|
| file:source | The full path of the source file. |
| file:destination | The full path of the destination file. |
| Required Input Attribute | Description |
|---|---|
| file | The name of the file that is to be read. |
| Optional Input Attribute | Description |
|---|---|
| encoding | The encoding of the file. The default value is UTF-8. |
| Output Attribute | Description |
|---|---|
| file:data | The file data. |
| Required Input Attribute | Description |
|---|---|
| file | The name of the file to read. |
| Optional Input Attribute | Description |
|---|---|
| separator | The separator of the file. The default value is the newline character. |
| encoding | The encoding of the file. The default value is UTF-8. |
| Output Attribute | Description |
|---|---|
| file:line | The line number of the file. |
| file:data | The file data. |
| Required Input Attribute | Description |
|---|---|
| file | The name of the file that is to be read. |
| data | The data that is to be written in the file. |
| Optional Input Attribute | Description |
|---|---|
| force | If force is set to true, the operation creates missing directories. The allowed values are true and false. The default value is true. |
| mode | The mode of writing. The allowed values are truncate and append. The default value is truncate. |
| encoding | The encoding of the file. The default value is UTF-8. |
| Output Attribute | Description |
|---|---|
| file:file | The full path of the file that is written to. |
| file:cdate | The modified date of the file. |