• Unzip a zip file containing multiple files and folders

    From Shaun Kulesa@21:1/5 to All on Sun Apr 16 12:05:57 2023
    I have a .zip file that contains folders which have files and other folders that contain files and folders and so on...

    It's a zipped version of the tcl directory if that makes it more clear.

    How can I unzip all of these into a directory?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robert Heller@21:1/5 to Shaun Kulesa on Sun Apr 16 19:59:36 2023
    At Sun, 16 Apr 2023 12:05:57 -0700 (PDT) Shaun Kulesa <shaunkulesa@gmail.com> wrote:


    I have a .zip file that contains folders which have files and other folders that contain files and folders and so on...

    It's a zipped version of the tcl directory if that makes it more clear.

    How can I unzip all of these into a directory?

    The "unzip" command will unzip the whole tree as it is stored in the .zip
    file, restoring the stored directories ("folders" -- a really stupid bit of terminology, thank you Steve Jobs) and the files in those directories in the restored directories, and so on all the way down the directory tree. Or do you want something else? The unzip command also has a -d option to change the top level directory to restore to, if you want to restore the files to a different directory (something other than the current default directory.

    At least this is how things work under Posix O/Ss (BSD Unix and Linux, etc.) from the command line. Don't know about how that work under a GUI. There are VFS packages to allow the Tcl program to open a .zip file as a VFS -- eg "mount" a .zip file like it was a "disk" and then use Tcl's FS functions (file command and source, open, read/gets, puts, fconfigure, close, etc. commands)
    to access files in the .zip file.




    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    heller@deepsoft.com -- Webhosting Services

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Shaun Kulesa@21:1/5 to All on Sun Apr 16 13:43:16 2023
    "Don't know about how that work under a GUI. There are
    VFS packages to allow the Tcl program to open a .zip file as a VFS -- eg "mount" a .zip file like it was a "disk" and then use Tcl's FS functions (file command and source, open, read/gets, puts, fconfigure, close, etc. commands)
    to access files in the .zip file."

    This is what I was afraid of, I will implement this later on but for now I have just made a windows batch script that I will call from Tcl to unzip the zipped file.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Luc@21:1/5 to All on Sun Apr 16 17:57:14 2023
    Are you aware of Tcllib?

    https://core.tcl-lang.org/tcllib/doc/trunk/embedded/md/toc.md

    More specifically:

    https://core.tcl-lang.org/tcllib/doc/trunk/embedded/md/tcllib/files/modules/zip/decode.md


    --
    Luc


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)