/
Run multiple CLI commands from a single batch or CSV file or text file
Run multiple CLI commands from a single batch or CSV file or text file
This article explains how to run multiple CLI commands from a single batch or CSV file or text file.
Run multiple CLI commands from a single batch file
Prefix each CLI command with 'cmd /c' as shown in the sample below:
cmd /c D:\atlassian-cli-8.7.0\jira.bat --action getServerInfo cmd /c D:\atlassian-cli-8.7.0\jira.bat --action addComment --issue "YUS-1" --comment "my comment"
Run the batch file from CLI.
D:\atlassian-cli-8.7.0>new.bat
Result
Without the 'cmd /c' prefix, only the first command is run in the batch file omitting all the commands that follow.
Run multiple CLI commands from a CSV file
Save the CSV file with the '--action' commands as displayed in the sample below:
--action getServerInfo --action addComment --issue "SUP-22" --comment "my comment" --action updateIssue --issue "SUP-21" --reporter "user10"
Run the CSV file as:
--action run --file "text.csv"
Result
Run multiple CLI commands from a text file
Save the text file with the '--action' commands as displayed in the sample below:
--action getServerInfo --action assignIssue --issue "TEST-8" --userId "user10" --action cloneIssue --issue "TSST-11" --description "clone description"
Run the text file as:
--action run --file "text.txt"
Result
, multiple selections available,
Related content
Examples
Read with this
Create bulk users in Jira using Jira Command Line Interface (CLI)
Create bulk users in Jira using Jira Command Line Interface (CLI)
Read with this
Action Types
Action Types
Read with this
CSV Client Examples
CSV Client Examples
More like this
runJobInAndRepeat
runJobInAndRepeat
More like this
runJobInAndRepeat
runJobInAndRepeat
More like this