Swiss File Knife
a command line
free external tools,
- download the free Swiss File Knife Base from Sourceforge. - open the Windows CMD command line, Mac OS X Terminal or Linux shell. - OS X : type mv sfk-mac-i686.exe sfk and chmod +x sfk then ./sfk - Linux: type mv sfk-linux.exe sfk and chmod +x sfk then ./sfk OS X and Linux syntax may differ, check the help within the tool.
sfk sel ... +zipto outfile sfk 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. options -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 also sfk zip all infos about zip creation. sfk ziptouni add just UTF-8 names. sfk unzip extract zip files. examples sfk 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. sfk seluni mydir +zipto out same as above. 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 named 'monday'. 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. .
sfk is a free open-source tool, running instantly without installation efforts. no DLL's,
no registry changes - just get sfk.exe from the zip package and use it (binaries for
windows, linux and mac are included).
read more about all sfk functions here.