I am writing a tcl script, in which I am calling wzunzip through exec,
but after executing and unzipping it is exiting from the script,without
executing the next line, can anybody tell what is the reason for it.
My code is like this:
exec wzunzip -ybc *.zip -d d:/fan/gir
puts "success"
Regards,
Kukku.
Kukku writes:
> but after executing and unzipping it is exiting from the
> script,without executing the next line, can anybody tell what is the
> reason for it.
Probably an error occurred, or at least Tcl thought so. First thing
with Tcl problems is always to reproduce the problem in an interactive
Tcl session. That should give an error message. Than in the script
I'd recommend you read the docs for the [catch] command and use it
(<http://wiki.tcl.tk/catch> has examples).
> exec wzunzip -ybc *.zip -d d:/fan/gir
> puts "success"
Which part of your system is supposed to expand "*.zip" to a real file
name? Does wzunzip do that automatically? Usually this is the job of
the shell, but there is no shell here and Tcl doesn't do it either in
the code as shown.
benny
Even if iam using catch command, after unzipping, it is exiting from my
script.The expansion and all will be done by the wzunzip, actually it
is unzipping all the files with *.zip, but then it is exiting.
Regards,
Kukku.
That shouldn't happen. Which version of Tcl, Windows and wzunzip are
you using? Does it happen with any ZIP file or just specific ones?
benny
Iam using tcl tk 8.4.7 , windows 2000, winzip 9 with command line
option. That error is really happening to me.
Regards,
Kukku