Page 1 of 1

Command line and return codes

Posted: Wed Oct 28, 2020 11:17 am
by mhsimkin
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

Re: Command line and return codes

Posted: Wed Oct 28, 2020 12:15 pm
by Eric
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