Hello,
I'm using mkzip from tcllib to create ZIP archives.
https://core.tcl-lang.org/tcllib/doc/trunk/embedded/md/tcllib/files/modules/zip/mkzip.md
Problem:
A directory that contains multiple files.
I only want to zip a specific file from that directory,
without including the entire absolute path or other files in the
directory in the ZIP archive.
Target:
only testfile01.txt in the zip file
1.)
set zipfile [file join $sourcedir "testfile01.zip"]
set options [list [file join $sourcedir testfile01.txt]] :zipfile::mkzip::mkzip $zipfile {*}$options
works, but with absolute path
2.)
set zipfile [file join $sourcedir "testfile01.zip"]
set options [list -directory [file join $sourcedir] -exclude {d* *02.txt}] ::zipfile::mkzip::mkzip $zipfile {*}$options
works without absolute path, but -exclude has to be adjusted
individually each time
Is there a direct way?
best regards
Gregor
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)