UPGRADE YOUR BROWSER

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# 30208

Tcl - "dir" is an invalid command in Windows Vista

Description

When I enter the command "dir" into the Project Navigator Tcl Shell to show the list of files in the current directory, the Tcl Shell returns the following message:

"invalid command name "dir":

How can I work around this error?

Solution

The issue is within the base tclsh for Windows Vista; the dir command is not recognized.

You can use "glob" as an alternative to "dir".

"glob" requires a search pattern, unlike "dir" which defaults to show all files.

To show all files in the directory, use "glob *.

AR# 30208
Date Created 02/14/2008
Last Updated 12/15/2012
Status Active
Type General Article