struggling to figure out starkit -> file system stuff

lvirden <[email protected]> Fri, 13 Jul 2007 10:21:05 -0700
Newsgroups gmane.comp.lang.tcl.starkit
Message-ID <[email protected]>
Okay - I'm trying to write a small example of tcl code that does the
following - after the starkit starts, copy larry.bat from the
starkit's vfs into c:/temp , then execute it.

My code says:

package require Tk
console show
wm withdraw .
puts "hello, world"

puts "now, let's execute a bat file"

set name [glob -nocomplain -dir $::starkit::topdir/lib/app-helloworld
-- lwv*.ba
t]
set rc [catch {file copy $name c:/temp/lwv.bat} output]
if { $rc eq 1 } {
        puts stderr "file copy of $name failed ($output)"
        return 0
}
set result [list]
if { [llength $name] > 0} {
        set result  [exec $name]
} else {
        puts "no .bat file found in [pwd]"
}

puts "and the result is: $result"
return 0


and the output I get is:
now, let's execute a bat file
file copy of {C:/Documents and Settings/lwv27/My Documents/MySoftware/
Tcl/helloworld.vfs/lib/app-helloworld/lwv.bat} failed (error copying
"{C:/Documents and Settings/lwv27/My Documents/MySoftware/Tcl/
helloworld.vfs/lib/app-helloworld/lwv.bat}": no such file or
directory)


It looks like I am miss some simple thing. I am hoping someone's
reading the group today with a gentle suggestion.