remove_files - 2022.1 English

Vivado Design Suite Tcl Command Reference Guide (UG835)

Document ID
UG835
Release Date
2022-05-05
Version
2022.1 English

Remove files or directories from a fileset

Syntax

remove_files [‑fileset <arg>] [‑quiet] [‑verbose] <files>...

Returns

List of files that were removed.

Usage

Name Description
[-fileset] Fileset name
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution
<files> Name of the file(s) to be removed

Categories

Project

Description

Removes the specified file objects from the current or specified fileset. The file is removed from the current project, but is not removed from the disk.

Files can be specified as file name strings, or as file objects returned by the get_files command. When specified as strings, the file is looked for in the current or specified fileset. When the file object is specified by get_files, the fileset is defined by the object, and -fileset is ignored.

When successful, this command returns nothing. If the specified file is not found, an error is returned.

Arguments

-fileset <arg> - (Optional) The name of the fileset to locate the specified files. As a default, the files will be removed from the current fileset as defined by the current_fileset command.

-quiet - (Optional) Execute the command quietly, returning no messages from the command. The command also returns TCL_OK regardless of any errors encountered during execution.
Note: Any errors encountered on the command-line, while launching the command, will be returned. Only errors occurring inside the command will be trapped.
-verbose - (Optional) Temporarily override any message limits and return all messages from this command.
Note: Message limits can be defined with the set_msg_config command.
<files> - (Required) The name of the files to remove from the project.
Note: If no files are specified, no files are removed.

Examples

The following example removes the file named C:/Design/top.xdc from the constraint set constrs_1:
remove_files -fileset constrs_1 C:/Design/top.xdc
Multiple files can be specified as follows:
remove_files -fileset sim_1 top_tb1.vhdl top_tb2.vhdl
The following example gets all the file objects in the current project, and removes them:
remove_files [get_files]
CAUTION:
This will remove ALL files from your design.