Visual Basic Scripts
This profile property enables you to run Visual Basic Scripts before and after a copy operation.

VBScripts
Startup Mode
- Upon Profile Startup
- Upon Profile Completion
Start With
This option enables you to specify the operation during which the script is to be started:- Copy Operation
- Copy Preview
- Process Copy Preview
- Scheduler
- Command Line
Wait Time
This option enables you to specify that the script be automatically aborted after a certain number of seconds.Requirements and Tips
- Visual Basic scripts can't be used with AllSync unless Microsoft Windows Scripting Host is installed on your computer. You can check this by running the sample script
Test.vbs
. - The properties and methods of the WScript object have to be called without "WScript." Example: Instead of
WScript.CreateObject
onlyCreateObject
has to be used. - Some properties and methods of the WScript object, e.g.
Sleep
orEcho
, cannot be used in the script or possess limited functionality. - The error value -99 causes the profile to be aborted and no error message will be generated. See sample script
CheckDestinationDrive.vbs
. You also can use a variable with the nameExitCode
and set the value to-99
.
Placeholders
The following placeholders can be used inside the script:Placeholder | Description |
---|---|
[SourceX] | [Source1] is replaced by the first source folder activated in the source folder list, [Source2] by the second one, etc. |
[DestinationX] | [Destination1] is replaced by the first destination folder activated in the destination folder list, [Destination2] by the second one, etc. |
[Profil] | Profile name |
[ErrorCount] | Error count |
[CopyToSource] | The amount of data in bytes to be copied from the destination to the source |
[CopyToDestination] | The amount of data in bytes to be copied from the source to the destination |
Options
Cancel profile if an error occurs
This option causes the profile to be terminated if an error occurs in the script or the script cannot be run for launching the profile.Sample Scripts
The sample scripts supplied with AllSync are located in theScripts
subdirectory of the AllSync application folder.
The sample scripts are continuously updated and adapted by us as needed.
When making changes to the sample scripts, make sure to save them under a different name otherwise they will be overwritten and your changes lost the next time you update AllSync.
The following scripts are currently available:
Test.vbs
This script enables you to test the functionality of Microsoft Windows Scripting on your system and get an impression of the possibilities offered by Visual Basic Scripting.Outlook.vbs
This script enables you to shut down Microsoft Outlook.OutlookExpress.vbs
This script enables you to shut down Microsoft Outlook Express.Run.vbs
This script enables you to run any program by inserting thePrg
variable in the program path.
KillTask.vbs
This script enables you to end a task. Call Windows Task Manager to find out the requisitetask name
.
ScreensaverOff.vbs \ ScreensaverOn.vbs
These two scripts enable you to respectively deactivate and reactivate your screensaver.CheckDestinationFolder.vbs
This script checking the first destination folder to see if it exists. The script returns the error code -99 if the folder is not accessible. In conjunction with the optionAbort profile ...
the profile will be aborted without any error message.
The profile will be aborted and generate an error message if the script returns another error code than -99.