back to content

Commands and Parameters

Commands

Parameters

Commands

The following is a list and general description of all the command-line commands.

Command

Description

About Displays the version information.

Required Params:
Optional Params: -ptype, -pserver, -pport, -puser, -ppwd

AddFile Adds one or multiple files to a project. The path of the file on the local machine is specified by the -workdir parameter.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -file, -workdir
Optional Params: -tempdir, -comment, -auto or -mergable or -bin, -notreadonly, -windows or -unix or -mac, -ptype, -pserver, -pport, -puser, -ppwd
AddFolder Adds an entire local folder to the database. The path of the folder on the local machine is specified by the -workdir parameter. Use -r to add the folder recursively.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -workdir
Optional Params: -tempdir, -comment, -r, -auto or -mergable or -bin, -windows or -unix or -mac, -notreadonly, -ptype, -pserver, -pport, -puser, -ppwd
AddLabel Adds a label to a project or a file.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -label
Optional Params: -file, -comment, -tempdir, -ptype, -pserver, -pport, -puser, -ppwd

BranchFile Breaks the share link so that the changes made to that file will no longer be reflected in other projects.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -file
Optional Params:  -comment, -ptype, -pserver, -pport, -puser, -ppwd
CheckInFile Checks in and unlocks one or multiple files. This command also makes the local files read-only.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -file, -workdir
Optional Params: -comment, -keep, -windows or -unix or -mac, -checkin or -ask or -undo, -del,  -notreadonly, -tempdir, -ptype, -pserver, -pport, -puser, -ppwd
CheckInProject Checks in and unlocks an entire project. This command also makes the local files in the project read-only. Use -r to check in the project recursively.

Required Params: -server, -port, -username, -pwd, -repository, -prj
Optional Params: -workdir, -r, -comment, -keep, -del, -windows or -unix or -mac, -checkin or -ask or -undo, -notreadonly, -tempdir, -ptype, -pserver, -pport, -puser, -ppwd
CheckOutFile Checks out and locks one or multiple files in the same project. This command also makes the local files writable.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -file
Optional Params: -workdir, -tempdir, -cancel or -ask or -skip or -replace,-windows or -unix or -mac, -time, -comment, -ptype, -pserver, -pport, -puser, -ppwd
CheckOutProject Checks out and locks an entire project. This command also makes the local files in the project writable. Use -r to checkout a project recursively.

Required Params: -server, -port, -username, -pwd, -repository, -prj
Optional Params: -workdir, -tempdir, -r, -cancel or -ask or -skip or -replace,-windows or -unix or -mac, -time, -comment, -ptype, -pserver, -pport, -puser, -ppwd
CreateProject Creates an empty project in the current repository. Use -prj to specify the project path and name.

Required Params: -server, -port, -username, -pwd, -repository, -prj
Optional Params: -comment, -ptype, -pserver, -pport, -puser, -ppwd
Delete Deletes a file or project from the repository, while local files still exist on the computer. If the -permanent flag is set, the deleted items cannot be recovered.

Required Params:  -server, -port, -username, -pwd, -repository, -prj
Optional Params:  -file, -permanent, -ptype, -pserver, -pport, -puser, -ppwd
GetAllRepositories Lists all accessible repositories by the input server.

Required Params: -server, -port, -username, -pwd
Optional Params:  -ptype, -pserver, -pport, -puser, -ppwd

GetAllUsers Lists all active users in the current repository.

Required Params: -server, -port, -username, -pwd, -repository
Optional Params:  -ptype, -pserver, -pport, -puser, -ppwd

GetFileHistory Displays the revision history of the file.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -file
Optional Params: -user, -datetime, -ptype, -pserver, -pport, -puser, -ppwd
GetFileInfo Displays the current information about a file, including type, version number and modified date.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -file
Optional Params:  -ptype, -pserver, -pport, -puser, -ppwd
GetFileList Lists the full name of all files in the specified project.

Required Params: -server, -port, -username, -pwd, -repository, -prj
Optional Params:  -ptype, -pserver, -pport, -puser, -ppwd
GetLatestFiles Retrieves the most recent files from the current repository.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -workdir, -file
Optional Params: -tempdir, -writable, -cancel or -ask or -skip or -replace,-time,-windows or -unix or -mac, -ptype, -pserver, -pport, -puser, -ppwd
GetOldVersionFile Retrieves the old file version from the current repository. The -rev parameter is used to specify an old file version.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -workdir, -file
Optional Params: -rev,  -tempdir, -writable, -cancel or -ask or -skip or -replace,-time,-windows or -unix or -mac, -ptype, -pserver, -pport, -puser, -ppwd
GetProject Gets the latest version of all files in the specified project from the current repository. Use -r to get the project recursively.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -workdir
Optional Params: -tempdir, -r, -writable, -time (-datetime or -label for Java Command Line), -cancel or -ask or -skip or -replace, -windows or -unix or -mac, -ptype, -pserver, -pport, -puser, -ppwd

GetProjectHistory Displays the revision history of the project. If the -v flag is set, the histories will be shown by version, or it will be shown by item.

Required Params: -server, -port, -username, -pwd, -repository, -prj
Optional Params: -user, -datetime, -v, -ptype, -pserver, -pport, -puser, -ppwd

GetProjectTree Graphically displays the project structure.

Required Params: -server, -port, -username, -pwd, -repository, -prj
Optional Params:  -ptype, -pserver, -pport, -puser, -ppwd
Interactive Puts the Client in an interactive shell, where you can enter commands one after the other, without having to re-run the Command Line Client each time. For example,
SourceAnywhereSCmd 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 until you type 'quit' to exit interactive shell.

Required Params: -server, -port, -username, -pwd, -repository
Optional Params : -tempdir, -ptype, -pserver, -pport, -puser, -ppwd

PinFile Locks a file or project to a specified version number. Once an item is pinned, no changes can be made to it and the pinned version becomes the current version of the item.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -file
Optional Params: -rev, -ptype, -pserver, -pport, -puser, -ppwd

Rename Renames a file or project in the current repository.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -newname
Optional Params: -ptype, -pserver, -pport, -puser, -ppwd, -file
SetFileType Sets type of the file.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -file, -mergable or -bin
Optional Params: -ptype, -pserver, -pport, -puser, -ppwd

ShareFile Shares the current version of one or multiple files to another project. Updates to a shared file will be reflected in all the projects to which the file is shared.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -file, -shareto
Optional Params: -branch, -comment, -ptype, -pserver, -pport, -puser, -ppwd
ShareProject Shares the current version of a project to another project. Updates to files in a shared project will be reflected in all the projects to which the project is shared.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -shareto
Optional Params: -branch, -r, -comment, -ptype, -pserver, -pport, -puser, -ppwd
UndoCheckOutFile Cancels the checkout of one or multiple files and reverts to the state before the Check Out operation was performed. This command also makes the local files read-only.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -file
Optional Params: -workdir, -tempdir, -windows or -unix or -mac, -time, -leave or -replace or -del, -notreadonly, -ptype, -pserver, -pport, -puser, -ppwd
UndoCheckOutProject Cancels the checkout of a project and reverts to the state before the Check Out operation was performed. This command also makes the local files read-only. Use -r to undo checkout of the project recursively.

Required Params: -server, -port, -username, -pwd, -repository, -prj
Optional Params: -workdir, -tempdir, -r,-windows or -unix or -mac,-time, -leave or -replace or -del,-notreadonly, -ptype, -pserver, -pport, -puser, -ppwd
UnPinFile Cancels the Pin operation, ignoring the files that are not pinned.

Required Params: -server, -port, -username, -pwd, -repository, -prj, -file
Optional Params: -ptype, -pserver, -pport, -puser, -ppwd


Parameters

The following is a list and description of  parameters accepted by Dynamsoft SourceAnywhere Command Line. It is necessary to enter full parameter names. If you want to cancel the current operation, type 'c' (for Java Command Line, you need to press Enter after 'c').

Note: Please put a space between a parameter and the value it acts on.

Parameter

Description

-ask Prompts on how to handle the local file copies .

Used with CheckInFile, CheckInProject, CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, and GetProject commands.

-auto Auto detects the file type.

Used with AddFile and AddFolder commands.

-bin Sets the file type to be binary.

Used with AddFile, AddFolder and SetFileType commands.

-branch Performs a branch operation immediately after the share operation.

Used with ShareFile and ShareProject commands.

-checkin Updates the unchanged item to a new version.

Used with CheckInFile and CheckInProject commands.

-comment Comments on the corresponding operations with text.

Used with the following commands: AddFile, AddFolder, AddLabel, BranchFile, CheckInFile, CheckInProject, CheckOutFile, CheckOutProject, CreateProject, ShareFile, ShareProject.

-datetime Specifies a period of time. By default it's from the current time to one year ago. You can type two value in the format "datefrom|dateto", or just one value as the ending date/time of period which begins from the current time .

Acceptable date/time formats:
"16 June 2005", "June 16, 2005  6:10:00", "6:10:00 June 16, 2005", "6/16/2005 6:10:00". (for Windows Command Line)
 "Jun/16/2005", "Jun/16/2005  6:10:00", "6/16/2005", "6/16/2005 6:10:00". (for Java Command Line)

Used with GetFileHistory or GetProjectHistory commands.

-del Deletes the local copy.

Used with CheckInFile, CheckInProject, UndoCheckOutFile, and UndoCheckOutProject commands.

-file Specifies  the name of the file(s) in the repository or the absolute path and full name of the local file(s).

Used with the following commands: AddFile, AddLabel, BranchFile, CheckInFile, CheckOutFile, GetLatestFiles, GetOldVersionFile, GetFileHistory, GetFileInfo, Delete, Rename, SetFileType, ShareFile, UndoCheckOutFile, Pin, and Unpin.

-h /-? Displays help at the command prompt.

Available for all commands.

-keep Keeps checkout status after the check-in operation.

Used with CheckInFile and CheckInProject commands.

-label Specifies a label that can be associated with a particular project version or file version.

Used with AddLabel command.

-leave Leaves the local copy alone.

Used with UndoCheckOutFile and UndoCheckOutProject commands.

-mac Uses Mac EOL for files.

Used with the following commands: AddFile, AddFolder, CheckInFile, CheckInProject, CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, GetProject, UndoCheckOutFile, UndoCheckOutProject.

-mergable Sets the file type to be mergable.

Used with AddFile, AddFolder and SetFileType commands.

-multipleCheckouts Allow multiple users to check out the same file.

Used with CheckOutFiles commands.

-newname Specifies a new name for the project or file that is being renamed.

Used with the Rename command.

-notreadonly Doesn't change the file attribute to read-only.

Used with the following commands: AddFile, AddFolder, CheckInProject, CheckInFile, UndoCheckOutProject and UndoCheckOutFile.

-permanent Permanently deletes a file or project from the database.

Used with the Delete command.

-port Specifies the port of a running Dynamsoft SourceAnywhere server or cache server.

A must for all commands.

-pport Specifies the port of the proxy server.

Needed when the proxy server is used.

-ppwd Specifies the password for the corresponding user to connect to the proxy server.

Needed when the proxy server is used.

-prj Specifies a valid project in the current Dynamsoft SourceAnywhere repository.

A must for all commands except About, GetAllRepositoties, GetAllUsers and Interactive.

-pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required.

Needed when the proxy server is used.

-ptype Specifies the proxy type. Valid -ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None".

Needed when the proxy server is used.

-puser Specifies the user name used to connect to the proxy server. If ptype = "None" or "Socks4", this parameter is invalid and not required.

Needed when the proxy server is used.

-pwd Specifies the password for the corresponding user to log into Dynamsoft SourceAnywhere repository.

A must for all commands except GetAllRepositories.

-r Performs the project level command recursively.

Used with the following commands: AddFolder, CheckInProject, CheckOutProject, GetProject, ShareProject and UncoCheckOutProject.

-replace Replaces the local copy with file(s) in the repository.

Used with the following commands: CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, GetProject, UndoCheckOutFile and UndoCheckOutProject.

-repository Specifies the repository you want to log into.

A must for all commands except GetAllRepositories.

-rev Specifies a version number of the file.

Used with GetOldVersionFile and Pin commands.

-skip Leaves the local copy alone (doesn't retrieve the latest version from the repository).

Used with the following commands: CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, and GetProject.

-server Specifies the domain name or IP address of a running Dynamsoft SourceAnywhere server or cache server.

A must for all commands.

-shareto Specifies the project into which a file or project will be shared.

Used with ShareFile and ShareProject commands.

-tempdir Specifies a local folder for storing temporary files.. The default temporary directory is specified in the ServerInfo->General Settings section of Dynamsoft SourceAnywhere Service Configurator (for Java Command Line, the default temporary directory is the system temporary directory). 

Used with the following commands: AddFile, AddFolder, CheckInFile, CheckInProject, CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, GetProject, UndoCheckOutFile, and UndoCheckOutProject.

-time Sets the modification time of the local file or project. Valid time parameters are "current" (default), "modi" and "checkin".
    modi - The item's last modified time.
    current - Current time.
    checkin- The item's last checked in time.
Examples: -time modi or -time current or -time checkin.

Used with the following commands: CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, GetProject, UndoCheckOutFile, and UndoCheckOutProject.

-undo Undoes the checkout without updating to a new version.

Used with CheckInFile and CheckInProject commands.

-unix Uses Unix EOL for files.

Used with the following commands: AddFile, AddFolder, CheckInFile, CheckInProject, CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, GetProject, UndoCheckOutFile, and UndoCheckOutProject.

-user Specifies an existing username.

Used with GetFileHistory and GetProjectHistory commands.

-username Specifies the user name used to log into Dynamsoft SourceAnywhere repository.

A must for all commands except GetAllRepositories.

-v Shows the project histories by version.

Used with the GetProjectHistory command.

-verb If present, outputs verbose status messages, such as connections, server responses, etc.
-windows Uses Windows EOL for files.

Used with the following commands: AddFile, AddFolder, CheckInFile, CheckInProject, CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, GetProject, UndoCheckOutFile, and UndoCheckOutProject.

-writable Makes the local files writable.

Used with GetLatestFiles, GetOldVersionFile, GetProject.

-workdir Specifies the working folder from which the Command Line Client finds or places items. By default it's Dynamsoft SourceAnywhere Command Line directory.

Used with the following commands: AddFile, AddFolder, CheckInFile, CheckInProject, CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, GetProject, UndoCheckOutFile, and UndoCheckOutProject.