Dynamsoft SourceAnywhere Hosted commands entered within the Windows Command Line must begin with "SAWHCmd". The syntax for Dynamsoft SourceAnywhere Hosted commands is as follows:
SAWHCmd Command [parameter(s)][value(s)]
Dynamsoft SourceAnywhere Hosted commands entered within the Java Command Line must begin with "java -jar SAWHCmd.jar". The syntax for Dynamsoft SourceAnywhere Hosted commands is as follows:
java -jar SAWHCmd.jar Command [parameter(s)][value(s)]
Command
A specific instruction to perform an operation or run a program. The commands in Dynamsoft SourceAnywhere Hosted are not case-sensitive.
For a complete list of commands in Dynamsoft SourceAnywhere Hosted Command Line, see Commands and Parameters.
Parameter
Used to modify the action of a command. The parameters in Dynamsoft SourceAnywhere Hosted consist of a hyphen ( - ) and a letter.
For a complete list of parameters in Dynamsoft SourceAnywhere Hosted Command Line, see Commands and Parameters.
Values
Can be a project or a file. The value must follow the parameter letter with a space between them.
If there is a space in any command parameter value, the value must be surrounded by
double quotes. For
example (for Windows Command Line):
SAWHCmd GetFileInfo -id 187 -username test -pwd test -tempdir
D:\temp -repository SAWH -prj $/123 -file "Text 1.txt"
In almost all cases where you can specify an item to act on, you can also specify many items by adding "/" between them. For example (for Windows Command Line):
SAWHCmd AddFile -id 187 -username test -pwd test -tempdir D:\temp -repository SAWH -prj $/123 -file Hello.txt/Test.txt
Interactive Shell
Dynamsoft SourceAnywhere Hosted Command Line Client provides an interactive shell for your convenience.
SAWHCmd Interactive -id 187 -pwd test -repository "Dynamsoft SourceAnywhere Hosted" -tempdir D:\temp
Now you are in the interactive shell. When you use other commands, the parameters -server, -port, -username, -pwd, -repository are not required. Take the Add File Command for example,
AddFile -file "test.txt" -prj $/123
Type 'quit' to exit interactive shell.