Command line interface
Besides using a browser, the Enterprise edition of SynaMan offers a command line version allowing users to upload and download files using scripts. The command line interface (CLI) supports both uploading and downloading files with wildcards.
SynaMan CLI, as the name suggests, is only available as a command line tool. There is no GUI. It is intended for users who want to write scripts for uploading and downloading files to a machine where SynaMan is running.
Prerequisites and Download
The CLI for SynaMan requires Java Runtime installed on the machine. Supported versions are JRE 1.6 or above.
- Click here to download an EXE file for Windows
- Click here to download a JAR file for other operating systems.
- Click here to download a zipped file containing EXE as well as the JAR file.
Following method is used to run SynaMan CLI
SynaManCLI.exe <Param1Name> <Param1Value> ... <ParamNName> <ParamNValue>
java -jar SynaManCLI.jar <Param1Name> <Param1Value> ... <ParamNName> <ParamNValue>
The first example will only work on Windows. The 2nd example will work on any operating system (including Windows, Linux, Mac and UNIX) as long as Java is installed and is in the PATH.
Parameters take a form of:
Following is a list of valid parameters:
- Local path
Refers to relative or absolute path on the client machine. It refers to a folder name if operation is download, downloadFolder or uploadFolder. It refers to a file if operation is upload.
- Operation (required parameter)
This parameter defines the operation you want to perform. The value portion of this parameter can either take a case-insensitive work or a case-sensitive single letter. Valid values are:
- download or D - Used to download a single file or multiple files with a wildcard character.
- downloadFolder or F - Used to download a folder recursively
- upload or U - Used to upload a single file or multiple files with a wildcard character.
- uploadFolder or P - Used to upload a single folder recursively
- dir or L - Fetch directory contents
- User's password (required parameter)
- Server's URL (required parameter)
Refers to the URL where SynaMan is running. For example: http://yourServer.com:6060 or https://secure.yourServer.com
- Shared Folder name (required parameter)
Refers to the shared folder name. This MUST refer to an existing shared folder name. Use $HOME to specify user's home folder.
- Server's path
Relative path on the SynaMan server with respect to the shared folder name. This refers to a folder name if operation is upload, uploadFolder or downloadFolder. It is a file if the path is downloadFolder.
- User's login (required parameter)
User's login ID
Uploading a file called POC.doc to a shared folder called Important Files
with a relative path set to Project 1/JohnD
. Notice the use of double quotes when a parameter value contains an embedded space.
SynaManCLI -o upload -s https://myServer -u John.Doe@xyz.com -p secret007 -shf "Important Files" -spath "Project 1/JohnD" -lpath POC.doc
Downloading the file uploaded in example 1. The file will be downloaded in the folder C:\temp. If lpath parameter is missing, the file will be downloaded in the current directory.
SynaManCLI -o download -s https://myServer -u John.Doe@xyz.com -p secret007 -shf "Important Files" -spath "Project 1/JohnD/POC.doc" -lpath C:\temp
Uploading an entire folder C:\MyProjectFiles
to the server.
SynaManCLI -o uploadFolder -s https://myServer -u John.Doe@xyz.com -p secret007 -shf "Important Files" -spath "Project 2/JaneD" -lpath C:\MyProjectFiles
Downloading an entire folder Project 3
to the local machine
SynaManCLI -o downloadFolder -s https://myServer -u John.Doe@xyz.com -p secret007 -shf "Important Files" -spath "Project 3" -lpath C:\MyProjectFiles