21.3.95 unlink_files

Description

This Tcl command removes a link to a file in your project and it is not removed link to a folder. You can unlink a file form a folder, and to unlink the whole folder you have to unlink all files one by one from the link folder.

unlink_files \
       [-file {absolute or related path and name of the linked file}] \
       [-from_disk {0|1}]

Arguments

ParameterTypeDescription
filestringAbsolute or relative path and name of the linked (remote) file you want to unlink. There may be multiple -file arguments (see example below). You can repeat this argument to unlink multiple files.
from_diskbooleanRemoves file from disk. Valid values are: TRUE or 1, FALSE or 0.

Error Codes

Error CodeDescription
NoneParameter 'file' is missing or has invalid value.
NoneRequired parameter 'file' is missing.
NoneUnable to find the file.
None

Parameter 'param_name' is not defined. Valid command formatting is 'unlink_files [-file "file"]+ [-from_disk "TRUE | FALSE"] ' .

Supported Families

Supported Families
PolarFire®
RTG4
SmartFusion® 2
IGLOO® 2

Example

  1. Unlink the file file1.vhd from my project.
    unlink_files -file {E:\Share\file1.vhd}
  2. Unlink files “E:\Share\abc.v” and “E:\Share\abc.sdc" from the project using Environment variable “MSCC_ROOT_1” that has the root directory path “E:\Share”.
    unlink_files -file {${MSCC_ROOT_1}/abc.v} -file {${MSCC_ROOT_1}/abc.sdc}

See Also