Unzip Command in tcl

Clovertech Forums Read Only Archives Cloverleaf Tcl Library Unzip Command in tcl

  • Creator
    Topic
  • #51782
    LaToya Butler
    Participant

      I attempting to create a tcl proc that unzips a file in a certain directory.  Here’s the code.

      proc rac_837_unzip2 { args } {

        global HciSiteDir

        echo “HCISITEDIR=>$HciSiteDir<" set test_dir “$HciSiteDir/data/ssi_837_cl” echo ” TEST DIRECTORY IS ” $test_dir exec cd $test_dir exec unzip 837.zip } I have a upoc thread setup using advance scheduling.  I keep receiving an error:  unzip:  cannot find or open 837.zip, 837.zip.zip or 837.zip.ZIP.’ The 837.zip files does exists in that directory.  Any suggestions?

    Viewing 0 reply threads
    • Author
      Replies
      • #71745
        David Barr
        Participant

          Change “exec cd” to “cd”, otherwise the cd command only affects the shell that is started by the exec command, and that shell goes away after the command completes.

      Viewing 0 reply threads
      • The forum ‘Tcl Library’ is closed to new topics and replies.