back to content

Command Line Syntax

Dynamsoft SourceAnywhere commands entered within the Windows Command Line must begin with "SAWSCmd". The syntax for Dynamsoft SourceAnywhere commands is as follows:

SAWSCmd Command  [parameter(s)][value(s)]

Dynamsoft SourceAnywhere commands entered within the Java Command Line must begin with "java -jar SourceAnywhereSCmd.jar". The syntax for Dynamsoft SourceAnywhere commands is as follows:

java -jar SourceAnywhereSCmd.jar Command  [parameter(s)][value(s)]

Command

A specific instruction to perform an operation or run a program. The commands in Dynamsoft SourceAnywhere are not case-sensitive.

For a complete list of commands in Dynamsoft SourceAnywhere Command Line, see Commands and Parameters.

Parameter

Used to modify the action of a command. The parameters in Dynamsoft SourceAnywhere consist of a hyphen ( - ) and a letter.

For a complete list of parameters in Dynamsoft SourceAnywhere 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):

SAWSCmd GetFileInfo -server 127.0.0.1 -port 8787 -username test -pwd test -tempdir D:\temp -repository SourceAnywhereS -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):

SAWSCmd AddFile -server 127.0.0.1 -port 8787 -username test -pwd test -tempdir D:\temp  -repository SourceAnywhereS -prj $/123 -file Hello.txt/Test.txt

Interactive Shell

Dynamsoft SourceAnywhere Command Line Client provides an interactive shell for your convenience.

SAWSCmd Interactive -server demo.Dynamsoft.com -port 8787 -username test -pwd test -repository "Dynamsoft SourceAnywhere" -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.