KB-132909: file.append

file.append

The command file.append can be used to write text in a file.

  • If the file does not yet exist, it will be created.
  • If the file already exists, the text will be added to the end of the file.

Any number of write arguments can be used.

Syntax:

file.append `<File>`
{
write `<Information without line break>`
write.line `<Info, will be included at the end of a line break>`
write.line.ifok `<Lines will only be written if the Exitcode = 0 after a call.>`
write.line.ifnok `<Lines will only be written if the Exist code after a call does not = 0.>`
write.ini `<[Section]Key=Value, writes an entry in the INI file>`
}

Example

Function ScriptBeforeUpload
{
// Prepare configuration file for BackupClient:
file.append $vdog::scriptinterface
{
write.ini [Sys3xxBackupClient]ServerIP=$def::var1
write.ini [Sys3xxBackupClient]CellIP=$vdog::uploadjob->5002
write.ini [Sys3xxBackupClient]BackupPath=$vdog::specific->dirbackup
}
}

Last update: September 15, 2023

Related Articles

IMPRINT | PRIVACY POLICY | COOKIE POLICY

Privacy Preference Center