AppDB WriteBlobToFile() Method

(SBM On-Premise only) Get the contents of a blob written to the file system.

Function Signature

 bool WriteBlobToFile( blobID, filepath )

Parameters

Parameter Type Description

blobID

int

The TS_ID of the blob from the TS_BLOBS table.

filepath

string

The full file name and path to write the file to.

Return

Type Description

bool

Returns true if successful; false otherwise.

Technical Details

SBM ModScript version: 11.3.

Example

var blobWrite = Shell.Db().WriteBlobToFile( 36976, "C:\\AppScript\\BlobFile.txt" );

Notes

A common case is to invoke WriteBlobToFile(), and then write changes to the file, finally updating the blob with the changes using UpdateBlobFromFile().

Use Ext.ReadTextFile, Ext.WriteTextFile, and Ext.AppendTextFile to interact with the file.

Tip: Optionally, use with TempFile to ensure that the file is deleted once the script is completed.

Related Topics

AppDb

AppDB UpdateBlobFromFile() Method

TempFile