I found a post about absolutely fabulous utility for manipulating zip files - zippy. Indeed, Windows 11 doesn't include unzip utility, and you need to use the Explorer to unzip a file. It's fine as long as you do not need to write scripts. Since I learn Rust, I decided to write such utility. My bad, because if I used the site search, I would just get zippy earlier, and used it.
Usage: zipdir [opts] <file> [<content_file>...]
Where opts are:
/e, /-extract
Extract file if its size is less the max.
/h
This help screen
/l, /-list
Show the archive directory
/m number, /-max number
Max size (in meg) of an extracted file. Should be specified with
with -e. Default 32MB.
/o string, /-outdir string
Output directory for extracted files.
/v
Version of the product
/w, /-overwrite
Overwrite existing files.
/x, /-exclude
Provided content entry patterns are considered for exclusion from
extraction.
I wrote the small utility, not AI. So quality can be low and for the reason, I ask to review its code and give some feedback. Thank you for your time.
tar --help
tar(bsdtar): manipulate archive files
First option must be a mode specifier:
-c Create -r Add/Replace -t List -u Update -x Extract
Common Options:
-b # Use # 512-byte records per I/O block
-f <filename> Location of archive (default \\.\tape0)
-v Verbose
-w Interactive
Create: tar -c [options] [<file> | <dir> | @<archive> | -C <dir> ]
<file>, <dir> add these items to archive
-z, -j, -J, --lzma Compress archive with gzip/bzip2/xz/lzma
--format {ustar|pax|cpio|shar} Select archive format
--exclude <pattern> Skip files that match pattern
--mtime <date> Set modification times for added files
--clamp-mtime Only set modification times for files newer than --mtime
-C <dir> Change to <dir> before processing remaining files
@<archive> Add entries from <archive> to output
List: tar -t [options] [<patterns>]
<patterns> If specified, list only entries that match
Extract: tar -x [options] [<patterns>]
<patterns> If specified, extract only entries that match
-k Keep (don't overwrite) existing files
-m Don't restore modification times
-O Write entries to stdout, don't restore to disk
-p Restore permissions (including ACLs, owner, file flags)
bsdtar 3.8.4 - libarchive 3.8.4 zlib/1.2.13.1-motley liblzma/5.8.1 bz2lib/1.0.8 libzstd/1.5.7 cng/2.0 libb2/bundled
I asked AI, but it looks like I should ask you. AI wasted a couple days of my time. On a good side, I polished my Rust skills. Happy Jul 4, you and your family. Eat a good BBQ and do not think of Rust today.