We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 34685

Project Navigator - Can I use Tcl to add a list of source files?


I have a list of source files that belong to my design in a text file. Is there a way to add a list of design source files to an ISE project?


There is no built-in GUI option to read in a list of files; however, the "xfile add" Tcl command can be used to recursively add a list of files that reside in a ".txt" or ".prj" file. An example is shown below:

 # Read data from file
 set fp [open "files.txt" r]
 set file_data [read $fp]
 close $fp

 # Process data from file
 set data [split $file_data "\r\n"]
 foreach line $data {
  xfile add $data
AR# 34685
Date Created 04/16/2010
Last Updated 05/02/2013
Status Active
Type General Article
  • ISE - 9.1i
  • ISE - 9.1i sp1
  • ISE - 9.1i sp2
  • More
  • ISE - 9.1i sp3
  • ISE - 9.2i
  • ISE - 9.2i sp1
  • ISE - 9.2i sp2
  • ISE - 9.2i sp3
  • ISE - 9.2i sp4
  • ISE - 10.1
  • ISE Design Suite - 11.1
  • ISE Design Suite - 11.2
  • ISE Design Suite - 11.3
  • ISE Design Suite - 11.4
  • ISE Design Suite - 11.5
  • ISE Design Suite - 12.1
  • Less