Command line and return codes

Got a problem with Viscosity or need help? Ask here!

mhsimkin

Posts: 1
Joined: Wed Oct 28, 2020 11:12 am

Post by mhsimkin » Wed Oct 28, 2020 11:17 am
Hi:

I have some questions about the Viscosity command line parameters:

1) If I call connect "My Connection" and the connection is already established what happens?
2) What are the return values (ErrorLevel) for successful connection, already connected, error connecting, error disconnection, already disconnected, successfully disconnected?

I'm trying to determine if I can place the commands in a powershell script to connect and then disconnect when a file sync needs to happen.

Thanks

Eric

User avatar
Posts: 1146
Joined: Sun Jan 03, 2010 3:27 am

Post by Eric » Wed Oct 28, 2020 12:15 pm
Hi mhsimkin,
1) If I call connect "My Connection" and the connection is already established what happens?
Nothing will happen. The connection will remain connected.
2) What are the return values (ErrorLevel) for successful connection, already connected, error connecting, error disconnection, already disconnected, successfully disconnected?
There are no error levels changed for different commands or their success. Instead a string is printed to command line notifying what has happened. For example:

Could not find connection "My Connection"

or

Connection "My Connection" told to connect

We have an example powershell script here which probably does everything you need and you can just insert your file copy around it - https://sparklabs.com/support/kb/articl ... 1-examples

Regards,
Eric
Eric Thorpe
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs
2 posts Page 1 of 1