"Prepend Lines" inserts lines at the beginning of a file. Up to four different lines can be inserted, including blank lines.
Input Parameters
PrependLines_Line1 (Required) - Specifies the first line to insert into the file. This field can contain macros. To specify blank lines, use the string "(blank)".
PrependLines_Line2 - Specifies the second line to insert into the file. This field can contain macros. To specify blank lines, use the string "(blank)".
PrependLines_Line3 - Specifies the third line to insert into the file. This field can contain macros. To specify blank lines, use the string "(blank)".
PrependLines_Line4 - Specifies the fourth line to insert into the file. This field can contain macros. To specify blank lines, use the string "(blank)".
Output Parameters
PrependLines_LineCount - Returns the number of lines added by this run of PrependLines. (Could be zero or blank if an error occurs.)
Notes
Use this prepend operation only against text files. Do not use it in a binary file, because this could have unforeseen consequences.
This built-in script can be run only one time per file.
This built-in script cannot be run as the first step of a task.
Example #1
Ed wants to insert a note with today's date followed by a blank line into archived log files that are moved from one server to another.
To perform this operation with MOVEit Automation:
Create a new task with a source, process, destination, and schedule.
Select "Prepend Lines" as the process.
Set process parameters:
PrependLines_Line1 = "Archived log file processed on [yyyy]-[mm]-[dd]"