Zip files selected by name, date or content, like including/excluding sub folders of a folder, zip only files changed since 3 days, or zip only files differing between two folders, with the free Open Source tool Swiss File Knife for Windows, Mac OS and Linux.
sfk sel ... +zipto outfilesfk seluni ... +zipto outfile
zip files selected by a previous command.
UTF-8 filename encoding
the same applies as with sfk zip. however,
- if you use sfk sel ... +zipto then only file-
name characters of your own system codepage
can be stored, as shown by: sfk ascii
if you use sfk seluni ... +zipto then any
unicode filename, including asian and cyrillic,
can be stored.
-force overwrite existing zip file.
-asdir x create a new folder x within the zip
and add all files into that folder.
cannot add to an existing folder.
-nometa do not add the os/code comment.
-setexec mask1 mask2 !mask3 ...
mark files as executable with
linux/mac operating systems.
must be followed by -dir ...
see alsosfk zip all infos about zip creation.
sfk ziptouni add just UTF-8 names.
sfk unzip extract zip files.
examplessfk sel mydir +zipto out
add all files of mydir into out.zip,
as UTF-8, limited to characters of your
windows system codepage.
sfk seluni mydir +zipto out
add all files of mydir as UTF-8 filenames,
supporting filenames of any language, like
cyrillic, greek or chinese. use seluni only
with +zipto as other sfk functions will fail
to read the listed utf-8 filenames.
sfk sel -dir mydir -subdir !save !\tmp-file !.bak !old +zipto out
add all of mydir into out.zip, except for
sub folders having 'save' in their name or
starting with 'tmp', and except for files
with .bak extension or 'old' in their name.
sfk sel -text mydir +zipto out
collect all ascii plain text files,
but no binaries like .obj .exe .png
sfk fromclip +zipto out
if you see filenames in the console,
mark and copy them to clipboard, then run
this command to collect them to out.zip.
for tips how to configure clipboard support
with CMD.EXE type: sfk help shell
sfk fromclip +filt -tabform $col4 +zipto out
a spreadsheed table contains 4 colums, with
filenames in the 4th column. copy the table
to the clipboard, then run this command
to zip all files listed in the 4th column.
sfk today -nosub . .bat +zipto out -asdir monday
select all .bat files that were changed today,
in the current dir but without sub folders,
and add them to out.zip as a new virtual folder
sfk xtext mydir "/foo*bar/" -names +zipto out
search all text files in mydir for phrases
starting foo and ending bar. pass the list of
found filenames to zipto, and create out.zip.