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 command chaining reference: several commands can be combined in a so-called "command chain". this is done by appending command names prefixed by "+", for example: sfk list docs .txt +ffilter -+foo "list" produces a filename list and passes this to "filefilter". ffilter reads the contents of these files looking for word "foo". chain data types three types of data can be passed from one command to another: - filename lists. - plain text records (lines). - stream text or binary data. output is dependent on command. for example, sfk select produces filename lists, sfk filter makes plain text records, xex/xed can produce streams of text or binary data. chain data type conversion vice versa, some commands accept filenames, or text input, or both. depending on what you want to do you may have to convert between this types of data. this can be done by the keywords: +texttofilenames or +ttf +filenamestotext or +ftt however, most sfk commands try to do such conversions automatically. using chain data between commands sfk cmd1 ... +then cmd2 does not pass any data to cmd2, prints cmd1 output to terminal. sfk ... +toterm dumps current chain content to terminal. sfk ... +tofile outfile dumps chain content to file outfile. sfk ... +tovoid +cmd2 does not pass any data to cmd2, drops cmd1 chain text silently. in all cases, the chain is cleared. if another command is following, it will receive no input from the chain. using chain data with call / label / end sfk ... +call myfunc passes no chain data into myfunc sfk ... +tcall myfunc passes text data into myfunc sfk ... +fcall myfunc passes filenames into myfunc sfk label ... +end returns no chain data sfk label ... +tend returns text data sfk label ... +fend returns a filename list scope and lifetime of options most options are valid only for the command where they are specified. if another command follows in the chain, the option is reset. but some options may also be specified on a global scope. read more on that under "sfk help options". more in the SFK Book the SFK Book contains long examples with input, output, script and detailed command explanations. type "sfk book" for more. see also sfk batch create an example script sfk help var how to use sfk variables sfk script about sfk scripting sfk call calling a function in a script sfk label possible options with label sfk if conditional execution sfk goto jump to a local label see also sfk script - place sfk commands into a multi-line script file sfk samp - examples for batch embedded sfk scripts
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.