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 unzip in.zip [-pat mask1 !mask2 ...] extract .zip file contents. Unicode marked filename support sfk unzip supports UTF-8 unicode filenames if they are marked as such, according to the zip format standard, or if they are provided as a zip format UTF-8 name extension. UTF-8 names are listed with 'u' on extraction. if foreign language names are extracted, - they may just show ??? for many characters, because the console cannot print them. just ignore this and extract it onto an NTFS file system, then open the output folder in Windows file explorer, to see the correct names. - other sfk functions may not be able to read the extracted files, if they use characters outside of your windows codepage. i.e. you may be able to extract chinese files on a west european windows, but other functions like sfk find will then fail to read them. Unicode unmarked filenames some old non-standard tools under linux/mac may produce zip files with unmarked UTF-8 names, which show no 'u' flag on extraction. to force extraction as UTF-8, use: sfk unzipuni Codepage filename support filenames which are not marked as 'u' UTF-8, but contain hicodes like umlauts or accents, are considered to use codepage 850, the system codepage of your computer. this can be wrong if the file was created with a different codepage. you may then try option -fromcode=n with n like 1252 850 852 866 1250 1251 or any other codepage. 64 bit zip file support sfk unzip can extract 64 bit zip files with sizes over 2 gb. sfk xe search in zip file contents is limited to smaller files, for details: sfk help xe options -pat mask extract only files having mask in their path or filename. use -pat !mask to exclude paths or filenames. -pat \mask\ says the path or file must start and end with mask. -test check the archive content integrity without writing any files. -verbose list full details for every file while in simulation. prints raw utf-8 or codepage filenames from the zip, allowing output redirect to file. add -full now for more details. -todir x write output to folder x -uauto detect UTF-8 filenames just by looking at their characters. this is not fully safe, and should be used only to fix bad names from zip files created with old non-standard tools. -noextutf do not use utf extension field, to see the contained oem names. -keep keep bad output file even if crc check failed. -fromcode=n set zip filename codepage manually. default on this computer is 850. output chaining sfk unzip supports text output chaining. see also sfk zip create a zip file sfk space show free disk space sfk unzipuni extract all as UTF-8 sfk checkzip test zip integrity - Depeche View Pro can directly view the content of .zip, .tar.gz and .tar.bz2 files, for quick analysis of source packages without extraction. stahlworks.com/dv - SFK XE can search in .zip, .tar.gz and .tar.bz2 archive contents directly like: sfk xfind -arc in.zip "/foo*bar/" search in all files within in.zip sfk xfind -arc mydir "/foo*bar/" search in all .zip, .tar.gz etc. files within folder mydir a demo is contained in this binary (it reads the first 1000 bytes per archive entry). stahlworks.com/xe - an overview of further zip/unzip tools for the command line is available under: stahlworks.com/zip examples sfk unzip in.zip extract whole content of in.zip sfk unzip in.zip -pat mydir .txt extract only files with mydir and .txt in their path, no matter in which order. sfk unzip in.zip -pat "foo*bar" extract foo1bar, foo2bar but not barfoo. sfk unzip in.zip -pat \mydir\ !.obj extract mydir but not mydir2 or oldmydir and exclude all .obj files. sfk unzip in.zip -verbose >mylist.txt write file list with details and raw names to mylist.txt, allowing to view this in utf-8 capable editors like Notepad++. sfk unzip in.zip +filter -!test extract all from in.zip, but do not print any names with "test" to terminal. .
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.