Functions

<< Click to Display Table of Contents >>

Navigation:  Using SyncBackPro > Technical Reference > Scripting >

Functions

Previous pageReturn to chapter overviewNext page

 

A number of built-in scripting functions are available. See also Script Classes.

 


function CopyFile(FromFilename, ToFilename);

 

FromFilename: The file to copy

ToFilename: The destination filename

 

Return value: On success 0 is returned, else a windows error code.

 

This function copies a file using SyncBack's internal copying routine (which gives progress feedback in the user interface).

 

See also SysErrorMessage.

 

 

function Escape(ToEscape);

 

ToEscape: The string to escape

 

Return value: The escaped string

 

Equivalent to the VBScript Escape method (for escaping strings to they can be passed in a URL).

 

For an example, see SendResultViaTwitter.bas

 

 

function GetObject(Pathname);

 

Pathname: The class required

 

Return value: The class requested

 

Equivalent to the VBScript GetObject method, but with only one parameter.

 

For examples, see WaitForFinishEx.bas and CreateRestorePoint.bas

 

 

function SysErrorMessage(WinErrCode);

 

WinErrCode: The windows error code

 

Return value: Returns the Windows error message for the error code

 

Returns the Windows error message for the Windows error code.

 

 

function VarToInt64(ToConvert);

 

ToConvert: The variable to convert to a 64-bit integer

 

Return value: A 64-bit integer, or 0 if the variable cannot be converted

 

This function converts values returned from scripting components to 64-bit integers. For example, use it with the Files property in FileSystemObject on the file size.

 

 

 

 

 

All Content: 2BrightSparks Pte Ltd © 2003-2017