Examples (For Windows Command Line)
All examples in this section are based on the following assumptions:
Example 1: Add a folder to the team project
Example 2: Add a file to folder
Example 3: Get a file
Example 4: Get file list
Example 5: Check in a file
Example 6: Check out a file
Example 7: Label a file
Example 8: Retrieve all files in a folder by a label
Example 9: Share a file
Example 10: Branch a file
Example 11: Branch a folder
Example 12: Delete a folder permanently
Example 13: Put the Command Line Client in an interactive
shell
Example 1: Add a folder to the team project
----------------------------------------
This adds an entire folder located at "c:\projects\test" on the local
machine to the project "$/cmd" in Dynamsoft SCM Anywhere.
SCMSCmd AddFolder -server 127.0.0.1 -port 7771 -username test -pwd
test123 -teamproject Dynamsoft SCM Anywhere -folder $/cmd -workdir
"C:\projects\test"
Example 2: Add a file to folder
----------------------------------------
This adds a file "test.txt" to "$/cmd" project.
SCMSCmd AddFile -AddFile -server 127.0.0.1 -port 7771 -username test -pwd test123 -teamproject Dynamsoft SCM Anywhere -folder $/cmd -file test.txt -workdir "C:\projects\test"
Example 3: Get a file
---------------------
This places the latest version of the file "test.txt" into the working
folder.
SCMSCmd GetLatestFile -server 127.0.0.1 -port 7771 -username test -pwd
test123 -teamproject Dynamsoft SCM Anywhere -folder $/cmd -workdir
"C:\projects\test" -file test.txt
Example 4: Get file list
------------------------------
This gets the list of files in the "$/cmd" project.
SCMSCmd GetFileList -server 127.0.0.1 -port 7771 -username test -pwd
test123 -teamproject Dynamsoft SCM Anywhere -folder $/cmd
Example 5: Check in a file
---------------------------
This checks in the previously checked out file "test.txt", located on
the working folder at "c:\projects\test".
SCMSCmd CheckInFile -server 127.0.0.1 -port 7771 -username test -pwd
test123 -teamproject Dynamsoft SCM Anywhere -folder $/cmd
-file test.txt
Example 6: Check out a file
---------------------------
This checks out the latest version of the file "test.txt" and places it
into the working folder.
SCMSCmd CheckOutFile -server 127.0.0.1 -port 7771 -username test -pwd
test123 -teamproject Dynamsoft SCM Anywhere -folder $/cmd -workdir
"C:\projects\test" -file test.txt
Example 7: Label a file
--------------------------
This applies the label "release" to file "test.txt" in
Dynamsoft SCM Anywhere server.
SCMSCmd AddLabel -server 127.0.0.1 -port 7771 -username test -pwd
test123 -teamproject Dynamsoft SCM Anywhere -folder $/cmd
-file test.txt -label release
Example 8: Retrieve all files in a folder by a label
----------------------------------------------------------
This gets a previous version of files in a folder from a label in
Dynamsoft SCM Anywhere server.
SCMSCmd GetOldVersionFolder -server 127.0.0.1 -port 7771 -username test
-pwd test123 -teamproject Dynamsoft SCM Anywhere -folder $/cmd
-workdir "C:\projects\test" -label release
Example 9: Share a file
-----------------------------------------------
This shares the current version of the file "test.txt" to the
folder
"$/cmd/testfolder" in Dynamsoft SCM Anywhere server.
SCMSCmd ShareFile -server 127.0.0.1 -port 7771 -username test -pwd
test123 -teamproject Dynamsoft SCM Anywhere -folder $/cmd
-file test.txt -shareto $/cmd/testfolder
Example 10: Branch a file
----------------------------------
This branches the latest version of file "test.txt" to the folder $/cmd/testfolder.
SCMSCmd BranchFile -server
127.0.0.1 -port 7771 -username test -pwd test123 -teamproject Dynamsoft
SCM Anywhere -folder $/cmd -file test.txt -branchto $/cmd/testfolder
-rev 0
Example 11: Branch a folder
----------------------------------
This branches the latest version of folder "$/cmd/testfolder" to the folder $/cmd.
SCMSCmd BranchFolder -server 127.0.0.1 -port 7771 -username test -pwd
test123 -teamproject Dynamsoft SCM Anywhere -folder $/cmd/testfolder
-branchto $/cmd -rev 0
Example 12: Delete a folder permanently
----------------------------------------
This deletes folder "$/cmd" permanently from Dynamsoft SCM
Anywhere.
SCMSCmd DeleteFolder -server 127.0.0.1 -port 7771 -username test -pwd
test123 -teamproject Dynamsoft SCM Anywhere -folder $/cmd -permanent
Example 13: Put the Command Line Client in an interactive shell
----------------------------------------
This puts the Command Line Client in an interactive shell.
SCMSCmd Interactive -server 127.0.0.1 -port 7771 -username test -pwd test123 -teamproject Dynamsoft SCM Anywhere
Note:
These examples are for Windows Command Line. For Java Command Line, the commands should begin with "java -jar SCMSCmd.jar" instead of "SCMSCmd" in these examples.
Software Configuration Management | SCM Solution | Version Control Software |Source Control Software
Software Configuration Management Hosting |Online Software Configuration Management |SCM Hosted
Copyright © 2009 Dynamsoft Corporation. All Rights Reserved.