Run a task from command line

DocKIT command line feature allows the user to instantiate a task from DOS command prompt anytime after an import task has been created using DocKIT's task wizard.

To run a DocKIT import task from command line:

1.

Usage:
DockitTaskRunner
<task name> [/profile:<user name>] [/u:<user name>] [/p:password] [/noprompt]

where,

DockitTaskRunner

Name of the DocKIT Task Runner application. Specify absolute path where the DockitTaskRunner located.

For example:
C:\Program Files\Dockit10x\DockitTaskRunner

task name

Name of the DocKIT Task to be run from DOS command prompt. Enclose the task name in double quotes.

For example:
"Sample Task1"

/profile

Denotes profilename stored in the current user context using DocKIT's ProfileManager, in which DocKIT task must be run. Enclose the user name in double quotes.

For example:
"/profile:contoso\johndoe"

/u

Denotes user name context in which DocKIT task must be run in the domain\user name or user name@domain name or user name format. Enclose the user name in double quotes.

For example:
"/u:VOYAGER\Administrator"
"/u:contoso\johndoe"
"/u:johndoe@contoso.com"
"/u:johndoe"

/p

Denotes the password for the user name specified in /u parameter. Enclose the password in double quotes.

For example:
"/p:2ab45fb"

/noprompt

This optional flag suppresses DocKIT's login dialog prompt to enter user credentials to connect to SharePoint

2. If /noprompt flag is not used, then the Credential Dialog will appear based on the options provided in task. The given credential will be used to connect to SharePoint.
3.

The import task will be reported in a new dialog as shown below:


Runtime statistics:

  1. Items to process - Shows the total number of files / folders available in the source location along with total size.

  2. Items Ignored - Shows the total number of files / folders ignored based on the task settings specified by the user. Migration task settings such as Do not overwrite and the files that do not meet the Export Condition will be taken into consideration here.

  3. Errors - Shows the total number of errors that occurred when processing the files / folders.

  4. Items processed - Shows the number of items (folders and files along with size) that are transferred or uploaded to SharePoint at any given time instance.

  5. Remaining - Shows the total number of files / folders (including size) that are yet to be transferred or uploaded to SharePoint at any given time instance.

  6. Elapsed Time - Shows the elapsed time from the instance the migration task started or commenced.

4.

Once the import task is complete, click Refresh button available in Task History pane in DocKIT main application. A new entry will be added in Task History section, where you can view the import activity performed when the task ran last.

Examples of invoking an import task from the command prompt:

C:\Program Files\Dockit10x> DockitTaskRunner "mytask1" "/u:voyager\administrator" "/p:2az" /noprompt

C:\Program Files\Dockit10x> DockitTaskRunner "Sample Task1" "/u:voyager\adminuser" "/p:2az$%&" /noprompt

C:\Program Files\Dockit10x> DockitTaskRunner "Sample Task1" "/profile:voyager\adminuser" /noprompt

D:\> "C:\Program Files\Dockit10x\DockitTaskRunner" "Sample Task1 (Re-import)" "/u:voyager\adminuser" "/p:2az$%&" /noprompt

 

DOS batch file examples:

  • To execute DocKIT task one by one from a batch file:
    "C:\Program Files\Dockit10x\DockitTaskRunner" "Sample Task1" "/u:voyager\adminuser" "/p:2az$%&" /noprompt
    "C:\Program Files\Dockit10x\DockitTaskRunner" "Sample Task2" "/profile:voyager\testuser" /noprompt

 

  • To execute multiple DocKIT tasks simultaneously:
    start "cmd" "C:\Program Files\Dockit10x\DockitTaskRunner" "Sample Task1" "/u:voyager\user1" "/p:ctest1" /noprompt
    start "cmd" "C:\Program Files\Dockit10x\DockitTaskRunner" "Sample Task2" "/profile:voyager\user2" /noprompt