delete-library-items
Deletes specified library items.
delete-library-items
[-b value | --bootstrap-config=value]
[-t value | --tool-password=value]
<-u value | --user=value>
[--recursive=<true|false>]
[--allow-unresolved-dependencies=<true|false>]
[--no-prompt=<true|false>]
[-q value | --search-query=value]
{-Pvalue}
{-Tvalue}
Overview
Use this command for deleting library items that can be specified
either directly or using a search query. Non-existing items are ignored.
Non-empty folders are deleted only if the
--recursive
flag is set to 'true'. Items with other
dependent items are deleted only if the
--allow-unresolved-dependencies
flag is set to 'true'.
Options
Option | Optional or Required | Default Value | Description |
---|---|---|---|
|
Optional | none | The path to the bootstrap configuration file. See Bootstrap.xml file for more information about this file. |
|
Optional | none | The configuration tool password used to decrypt the database password in the file bootstrap.xml. If the tool password is omitted, the command prompts the user for it in the console. Refer to Bootstrap.xml file. |
|
Required | none | The command is executed as the provided user. This user must have a library administrator role. The name is given on the form DOMAIN\username or username@domain. Note that if the user is in the default domain (SPOTFIRE) it is sufficient with just a username. |
|
Optional | false | This flag indicates that the contents of
non-empty folders should be deleted (recursively). If this flag is omitted or
set to 'false', the command will prompt for confirmation if needed (unless the
--no-prompt flag is set to 'true').
|
|
Optional | false | This flag indicates that deletion of items
with other dependent items is allowed (thus potentially creating unresolved
dependencies).
If this flag is omitted or set to 'false', the command will
prompt for confirmation if needed (unless the
|
|
Optional | false | This flag indicates that the command should
not prompt for confirmation to delete non-empty folders or items with dependent
items. Has no effect if both the
--recursive and
--allow-unresolved-dependencies flags are set
to 'true'.
|
|
Required unless at least one path has been
specified using the
-P argument.
|
A library search query that selects the items to delete. | |
|
Required unless a search query has been provided. | The path to an item to delete. Must be
specified together with a
-T argument which specifies the type of the
item. This argument is required unless a search query has been provided using
the
--search-query argument, and can be specified
multiple times with different values.
|
|
|
Optional. Can be specified multiple times with different values. | none | The type of item to delete. Must be
specified together with a
-P flag, which specifies the path to the item.
See
Spotfire item types for
a list of items that can be deleted.
|
Examples
In all examples below the user 'admin' belongs to the 'SPOTFIRE' domain and is a Library Administrator.
To delete an analysis:
delete-library-items --user=admin -P"/Example/Sales" -Tspotfire.dxp
To delete an empty folder:
delete-library-items --user=admin -P"/Example/Empty folder" -Tspotfire.folder
To delete an analysis and an empty folder:
delete-library-items --user=admin -P"/Example/Sales" -Tspotfire.dxp -P"/Example/Empty folder" -Tspotfire.folder
To delete all SBDF files:
delete-library-items --user=admin --search-query="item_type::sbdf"
To delete a non-empty folder:
delete-library-items --user=admin --recursive=true -P"/Example/Non-empty folder" -Tspotfire.folder
To delete an information link that might be used by one or more
analyses:
delete-library-items --user=admin --allow-unresolved-dependencies=true -P"/Example/Information link in use" -Tspotfire.query
To make the command fail rather than prompt for confirmation when
trying to delete a non-empty folder or an item with dependent items:
delete-library-items --user=admin --no-prompt=true -P"/Example/Non-empty folder" -Tspotfire.folder
Parent topic: Command-line reference