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
| Parameter | Type | Description | 
|---|
| file | string | Absolute 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_disk | boolean | Removes file from disk. Valid values are: TRUE or 1, FALSE or 0. | 
Error Codes
| Error Code | Description | 
|---|
| None | Parameter 'file' is missing or has invalid value. | 
| None | Required parameter 'file' is missing. | 
| None | Unable 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
- Unlink the file file1.vhd from my project.
unlink_files -file {E:\Share\file1.vhd}
 - 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}