Table of Contents

delete

Description

The delete command deletes one file, one folder, or multiple files found by search. It supports target selection by file path, directory path, search query, or ID.

Syntax

delete [-filePath|-id] -directory -search -recursive -list -csv -destroy

Parameters

  • filePath: (Optional) Specifies the file path of the file to be deleted.

  • directory: (Optional) Specifies the directory to be deleted. If used with the -recursive parameter, all files and subdirectories within the directory will also be deleted.

  • search: (Optional) A search query to filter files or directories to be deleted.

  • id: (Optional) Specifies the ID of the file to be deleted.

  • recursive: (Optional) Deletes all files and subdirectories within the specified directory. This parameter is only applicable when deleting directories.

  • list: (Optional) Lists all the deleted files. Specifying recursive with this parameter will do a drill down search and fetch all deleted files.

  • csv: Exports a list of deleted files to a csv. This only works if list is specified.

  • destroy: If specified, the deleted file will be also destroyed. -destroy only affects results from the search parameter.

Note

Use the exported csv from -csv with the recover command.

Note

-destroy only affects results from the search parameter.

Examples

Delete files matching a search query:

delete -search "%.sldprt"
# delete

Remarks

  • The delete command requires at least one of the following parameters: filePath, dir, search, or id.
  • Use the recursive parameter with caution, as it will delete all contents within the specified directory.
  • Ensure you have the necessary permissions to delete files or directories in the PDM system.

Tutorial

Availability

Available since PDMShell 2.0.0.