WRITE.FILE
The command will write files and images from the Data Source in FROM to a file-path. For images it can resize, change the image format and change the aspect by exact fitting or cropping or smart fitting. It performs all of the same well known image manipulation functionality as the Media Server, and the syntax is identical. The command is introduced from Perfion2022 R1.
Properties
From | Input Data Source If the input is a neutral Table-format the columns can be used to map fields to the files. If the input is a binary stream, the input will be written to the file. |
To | Optional. Specifies the root of a path. If specified, all filenames will be prefixed with the root-path value |
Parameters
@File | The file name. The name can be dynamically named via the variables from the file information. See the method Perfion.WriteFile for more information. |
@Par | Parameters to manipulate the images. See the method Perfion.WriteFile for more information. |
@Encoding | Set the file encoding. If it is not set, it will use the default encoding UTF-8. It is possible to set encoding to: UTF-8, UTF-16 (Unicode), utf-16BE (Unicode Big-Endian), windows-1252 and other Code Page Names from Code Page Identifiers - Win32 apps (From Perfion 2023R1) |
@IgnoreError | Ignore errors when writing files. If the saving failed the "Succeed" in the output will be False |
Map
From | Name of Header, as it is named from Input-source. |
To |
It's worth mentioning that both "File" and "Par" fields can be mapped from the Input source instead of using the @parameters - see examples below |
Script | Any Script code to execute for this header |
Examples
Note the alternative use of File and @File as parameters below.
Example of WRITE.FILE command setup in Actions to save each image in imagetable. The file name uses the variables obtained directly from the images:
Example of WRITE.FILE command setup in Actions to save each image in imagetable. The file name use the value from the imagetable as the file name:
- 1 Properties
- 2 Parameters
- 3 Map