Swiss File Knife Changelog

What's new in Swiss File Knife 1.9.8.2

Sep 26, 2022
  • Sum: added clipboard access on desktop linux and mac. copy to clipboard is now faster. detail improvements and bugfixes.
  • Add: sfk fromclip/toclip on Macintosh, through the pbcopy/pbpaste tool.
  • Add: sfk fromclip/toclip on desktop linux, through the xclip tool.
  • Add: "if" now accepts text "1" or "0" to execute or skip the following command or block.
  • Add: sfk incvar, decvar to increase or decrease the value of a numeric variable.
  • Add: sfk unzip -asdir x renames the top level folder from a zip file on extraction.
  • Add: sfk ping: option -noterm to allow writing of ping output to a file.
  • Add: sfk make-random-file: option -char c to create a file filled with character c
  • Add: sfk load: option -force to continue script on missing file
  • Add: sfk calc: -hex to print hexadecimal result.
  • Add: sfk sft ... putx: alias for put -setexec=*
  • Add: option -maxsub=n to include up to n subdir levels in commands like list.
  • Add: sfk knxsend, knxdump: more data types.
  • Opt: sfk toclip: massive performance improvement with larger data, if -trim etc. options are not used.
  • Opt: sfk fromclip: performance improvement if following command can receive binary, like xed or xex.
  • Chg: sfk toclip: now receives binary and text data, to avoid unwanted conversions.
  • Fix: hexfind: -maxdump was ignored in sfk ose.
  • Fix: sfk batch vedit.bat: join of videos now works with ffmpeg 4.4.1 or higher
  • Fix: sfk ... +hexdump -offlen too much output.
  • Fix: sfk data: symbols like $1foo did not reuse.
  • Fix: make-random-file: sometimes added LfLf instead of just CrLf line endings.
  • Doc: more details on -deacc search option.
  • Doc: alias: xclip example for windows.

New in Swiss File Knife 1.9.7.0 (May 23, 2020)

  • Sum:
  • Improved file copy and backup, shown in a new script template.
  • SFK for Mac OS/X is now available as a 64-bit binary.
  • Improved FTP/SFT clients. Mobile friendly web server.
  • Improved batch support on linux. Many bug fixes and detail improvements.
  • CHG:
  • SFK for Windows: now uses the Visual Studio 2015 runtime also for 32-bit binaries (it always used it for the 64 bit binaries). This may cause a one-time recopy of files with sfk copy/sync and sft cput, as the new runtime interprets file dates in daylight savings time different.
  • CHG: SYNTAX CHANGE: sfk filter ++word1 ++word2 is deprecated. Use instead sfk filter -and+word1 -and+word2, or sfk filter "-+word1*word2" to search in given order. The "++" will be used in a future version to control command chaining data flow.
  • CHG: SYNTAX CHANGE: script remarks starting like //text without any whitespace are now deprecated. sfk script, call, perline now require that "//" remarks are followed by one space, to avoid ambiquities with //pathname UNC paths.
  • FIX: sfk sel mydir +del a.txt deleted mydir files. now the parameter conflict produces an error.
  • CHG: FTP/SFT CLIENT SYNTAX CHANGE: filenames containing whitespace like 'the dir/the file.txt' can no longer be typed as is, but must be surrounded by quotes "". this is because ftp/sft now allows to add another parameter, which is a different target filename.
  • CHG: errors and warnings are now prefixed by the current sfk command name, to find script errors easier.
  • Chg: sfk batch: new example scripts. default is a small script with a simple file copy example. added option -full to create a large backup example script with different commands on the same file set.
  • Add: sfk ftp/sft put now supports a different remote file name.
  • Add: sfk ftp/sft get now supports a different local file name.
  • Add: sfk sft put: option -setexec to set executable flag on files when sending to a linux server.
  • Add: sfk webserv: mobile friendly layout
  • Add: script: empty parameters "" are now accepted the same way as option -noop (no operation), avoiding many unexpected syntax errors on optional input parameters.
  • Opt: sfk big, sfk late: massive performance improvement when listing many files.
  • Chg: unknown options now produce an immediate error with most commands, instead of a delayed or no error.
  • Chg: command chain no longer stops at +view.
  • Add: script -anyparms, alias for script -literal.
  • Chg: sfk clipsrc now also expands % to %%.
  • Chg: sfk dir/stat mydir +view now shows stats in dview.
  • Add: sfk list -withhead now passes header infos like 'listing n of n files' to command chain.
  • Add: sfk dir/big/late full colored +view support.
  • Add: sfk syncnames, heuristic file name change sync.
  • Add: sfk calc: experimental brackets support.
  • Add: sfk time: option -strfpat to use strftime format.
  • Add: sfk date: just show the current date.
  • Add: sfk batch on linux/mac: now does chmod +x on the created batch.
  • Add: sfk alias, mkcd on linux: detailed help in case of error how to use it.
  • Add: sfk alias, mkcd on linux: if done using sudo then the batch file owner is now set to the normal user.
  • Add: sfk sft: ~ as alias for localhost
  • Fix: sfk ftp/sft missing error text with single file.
  • Fix: sfk ... +view color of warnings was unreadable yellow, now it is magenta like the sfk white background scheme.
  • Fix: dir, snapto: wrong typed options caused to select all files of current folder.
  • Fix: -fileset: memory leaks on multiple use in subsequent commands.
  • Fix: sfk sel -fileset fname did not work.
  • Chg: warning "cannot read file stat" is now just "cannot read".
  • Doc: sft -showip

New in Swiss File Knife 1.9.6.2 (Feb 23, 2020)

  • sum:
  • Fixed CRC checksum calculation with 64-bit sfk
  • Better handling of multiple network interfaces with sfk ip
  • FIX:
  • sfk 64 bit: wrong crc checksum calculations
  • sfk zip created wrong crc checksums
  • sfk unzip showed wrong crc error messages
  • sfk crc, crcgento, crccheck produced wrong results
  • CHG:
  • OUTPUT CHANGE: sfk ip under windows now gives a list of all possible ip's if more than one network interface exists the preferred ip can now be filtered by environment variable SFK_OWN_NET. for batch files the output of 'sfk ip' can also be predefined by SFK_OWN_IP
  • add: calc: now tolerates whitespace text
  • add: udpdump: sfk for windows: when listening for multicast traffic sfk now listens on all network interfaces
  • doc: xed: reasons for unexpected line breaks
  • fix: compile: vc14 (vs2015) support

New in Swiss File Knife 1.9.6.0 (Feb 8, 2020)

  • Improved:
  • Help for general options.
  • Web server and scripting.
  • Fix:
  • Multi directory file selection using
  • Dir ... -subdir ... -dir ... [-file]
  • Selected far too few files, or stopped
  • With an error if another -file was given.
  • Check your scripts for this combination.
  • Crash on some -dir -subdir usages in two
  • Subsequent chain commands.
  • Chg: httpserv: improved page layout with
  • More compact file list output.
  • Added :
  • Option -wide for old format.
  • Script: system variables
  • Sys.ownscript.name
  • Sys.ownscript.text
  • To get the filename and text data
  • Of the current running script.
  • Crccheck -sane to skip files which are
  • Newer than the crc list.
  • Fix:
  • Option -fileset stopped the command chain,
  • Following commands like +filter were ignored.
  • Select: can now use a list of filenames
  • Given by -flist.
  • Xfind: now accepts filenames produced by
  • A previous command (just as extract and
  • Xhexfind already did), allowing to run a nested search.
  • Ascii: alignment of first hex codes,
  • Change of headline text.
  • Sfk web: download limit default sizeincreased from 30 to 100 mb.
  • Full rework of sfk help options.
  • Select, zip: -flist examples.
  • Stat: option -flist.xfind: how to run a nested search with
  • Xfind -names ... +xfind.
  • Xfind: how to get result text and filename within the same line.
  • Xfind: example how to search a mail inbox.
  • Support for zip extension .jmod

New in Swiss File Knife 1.9.5.2 (Aug 28, 2019)

  • sum: improved difflines and reading from std input.
  • add: sfk jsonform, reformat JSON data for easy reading and searching
  • add: SFKTray V1.1 now supports display of patterns up, down, left, right, all instead of just a single slot. for documentation and example
  • see: sfk status
  • add: SFKTray Full V1.1 now supports up to 3 instances running in parallel, with a total of up to 27 lights.
  • add: sfk sft(serv) option -notify=h to show an up or down arrow in SFKTray on file transfer
  • add: tdifflines to use chain text together with a file name
  • add: difflines option -swap to change order of input data
  • add: windows: snapto -slow option to run with a lower process priority.
  • add: windows: fromclip option -tofile x.
  • chg: hexdump: can now use -pure -recsize=n to dump n input bytes per output record.
  • fix: crash when using -i with empty input

New in Swiss File Knife 1.9.5.0 (Jun 5, 2019)

  • sum: sfk snapto can now include text from office files like .docx .xlsx .odt, allowing fast loading and browsing of the output file by Depeche View.
  • add: sfk olist, list only office files within a folder.
  • add: snapto: option -office to include text from office files like .docx .xlsx .odt
  • add: snapto, ofind: option -justoffice to read only office files, but not plain text files.
  • chg: no longer loading binaries with commands like snapto just due to a file mask, but still by .extension. use option -wlbin for the old behaviour.
  • add: difflines: option to read from stdin.
  • fix: difflines: example with variables.
  • fix: require: if no version info was found it produced a non speaking error. now it assumes version 0.0.0
  • fix: sfk ose: missing office file support. - doc: help office: snapto examples.
  • doc: sfk view: dview office notes.

New in Swiss File Knife 1.9.4.3 (Mar 22, 2019)

  • Rel: 21.03.2019, Minor Update
  • Sum: improved sfk name and rand. bugfix for simple expressions using ortext.
  • Fix: simple expressions: crash when using many [ortext] in the same search pattern.
  • Chg: name: no longer searches in meta data by default, e.g. sfk name 1234 no longer produces unexpected results because their filesize is 1234.
  • Add: name: option -withmeta and -meta to also search in meta data of index.
  • Add: name: -spat support.
  • Add: sfk fileserv, alias of sfk sftserv.
  • Add: sfk ... +put, alias of +sft ... cput.
  • Add: sfk ... +putall, alias of +sft ... mput.
  • Fix: rand: first value per process start contained very few random
  • Add: rand: now supports larger values, hex output, and setting a seed
  • Add: treesize: option -gb[yte] to list all sizes in gigabytes.
  • Add: ping: option -time to display reply time when pinging a single host
  • Doc: ping: info on graphical ping output

New in Swiss File Knife 1.9.4.2 (Feb 17, 2019)

  • 16.02.2019, Major Update
  • Improved office file text search with options to produce UTF-8 output.
  • xlsx content loading showed wrong output text in some cases.
  • ofind, oload, ofilter: option -utfout to keep UTF-8 encoding on output text.
  • ofind: option -utfin to allow use of UTF-8 encoded search terms with -utfout.
  • oload: option -raw to show xml content.
  • oload, ofilter: no longer shows zip file comment.

New in Swiss File Knife 1.9.4.0 (Feb 11, 2019)

  • HG: Syntax Change: xfind now only searches in plain text files, but not in binaries. use xfindbin to search also binary files.
  • CHG: Syntax Change: find now only searches in plain text files, but not in binaries. use findbin to search also binary files.
  • Add: ofind, search text in office files like .docx .xlsx .ods .odt and plain text files.
  • Add: ofilter, filter text of an office file.
  • Add: oload, load text of an office file for display or further processing.
  • Add: sfk help office, for details about supported office file extensions.
  • Add: sfk alias, mkcd: support for SFK_PATH environment variable, to write batch files only into this folder.
  • Chg: sfk getdv: now also suggests to save to SFK_PATH if given.
  • Add: echo: option -stream for best output transfer to setvar or xed.
  • Dep: xtext is deprecated (redundant to xfind)
  • Dep: ftext is deprecated (redundant to find)
  • Fix: zipto: crash on sub folder names containing accent characters, especially on select ... +zipto.
  • Chg: sfk data: max content per symbol is now 8 kbytes instead of 1.
  • Fix: xed: sfk ... +xed without any patterns created unwanted color output.

New in Swiss File Knife 1.9.3.4 (Dec 8, 2018)

  • sum: improved scripting support. the free SFKTray lite can now display 4 status lights.
  • add: SFKTray Lite now supports 4 status slots.
  • add: windows: fromclip +copy/move support. allows to mark filenames in cmd.exe then copy/move the marked names.
  • add: sfk sel a.txt b.txt +copy out support.
  • add: sfk filt in.txt -+pat +copy out support.
  • add: addtovar: option -noline to not append extra linefeeds.
  • add: setvar: support slash patterns by -spat.
  • add: getvar: option -tofile to write variable content to a file.
  • add: num: support of negative numbers.
  • add: dir -juststat to show just statistics.
  • add: ftpserv: -verbose now shows path info on invalid path error, -verbose=2 shows dump of input line.
  • chg: ftp client: now -quiet no longer tells "no filenames from previous commands".
  • fix: rmtree: short confirm "rmtree." did not work.
  • fix: dir repeated with +loop showed wrong number of total bytes.
  • chg: sfk dir now supports -noname.
  • doc: setvar: examples for string editing.
  • doc: xtext: find lines not matching a pattern.
  • doc: filter: file copy examples.

New in Swiss File Knife 1.9.3.3 (Nov 1, 2018)

  • Sum: improved scripting support. bugfix for scripts running in folders with spaces in their name.
  • FIX: sfk batch: script did not work within folder names containing spaces, like C:usersFoo Barmyscript.bat. now sfk script "%~f0" with quotes is used. fixed also related commands like sfk samp sfk, sfk samp sfkbash.
  • CHG: chaining: if chaining is stopped due to missing filenames it now shows a notice again by default, to avoid unexpected chain stops without any infos. the notice can no longer be suppressed by -quiet, but as always by -nonote.
  • Fix: option -quiet did not work globally.
  • Chg: chaining: -verbose no longer tells how the command chain is stepped. use -tracechain instead.
  • Add: general option -keepchain to never stop the command chain, even if commands that expect filenames get none.
  • Add: label: support for all general options.
  • Add: setglobalopt to set global options.
  • Add: chaining support with where, index, script, home.
  • Add: encode -base64: option -nowrap to keep output as one long line.
  • Fix: getcol: unexpected set of global -upat option.
  • Chg: sfk chars: now supports multiple code parameters.
  • Add: ffilter: warning on wrong parameter sequence.
  • Fix: copy -ltarg under windows showed source name.
  • Chg: zip reading: better error message on missing file.
  • Doc: tell: example how to print text starting with '+'.
  • Doc: wtou: added perline example.
  • Doc: if: info about limited nesting.
  • Doc: end: was not searchable.
  • Doc: status: infos about limited colors.
  • Doc: label: more detailed info about global options.
  • Doc: help opt: -tracechain.
  • Doc: help chain: info on "no files, stopping x".

New in Swiss File Knife 1.9.3.2 (Oct 3, 2018)

  • sum: added easy installation under windows by a double click on sfk.exe, then key 1. this copies sfk.exe to a folder c:tools and creates a shell icon on the desktop.
  • add: sfk base: optional installation when running sfk by double click from windows explorer.
  • CHG: Data Change: sfk index, name under windows no longer use files directly within C: but only in a folder C:zz-index, to avoid user local storage in a VirtualStore folder. use sfk name -useold to read old index files. the new behaviour allows one C:\ index file for all users on the same windows machine. add: predefined variable: sys.sfkver for sfk version
  • add: predefined variable: sys.numcols for number of columns available in console
  • fix: getcol, tabcol: caused unexpected double execution of following chain commands.
  • add: clipsrc: -h help option
  • del: clipxml: does not work, no longer documented.

New in Swiss File Knife 1.9.3 (Sep 19, 2018)

  • Sum: added sfk addtovar to collect text lines
  • in a variable, sfk crc to create crc-32 checksums,
  • sfk difflines to list different unique lines
  • between two text files. improved ftp client
  • compatibility. many detail improvements
  • for scripting, like new variable functions.
  • Chg: Syntax Change: command chaining no longer allows
  • data tunneling through non consuming commands.
  • in a chain like cmd1 +cmd2 +cmd3 +cmd4 +cmd5
  • it is no longer possible to send data from
  • cmd1 to cmd3/4/5 if cmd2 uses no chain data
  • (e.g. if, tell). this tunneling was inconsistent
  • and caused endless conflicts by unwanted chain data
  • in cmd3/4/5. use -keepdata or SET SFK_CONFIG=keepdata
  • for the old behaviour which was inconsistent
  • and worked only sometimes.
  • Chg: Syntax Change: sfk if: no longer passes through
  • any chain data, as this behaviour was ambiguous
  • and caused endless unwanted chain input.
  • this means combinations like
  • +xed /a/b/ +if ... +xed /b/c/
  • are no longer possible. use '+tif' instead,
  • or global option -keepdata.
  • Add: sfk ... +tif for conditional execution
  • requesting text and stream data explicitely.
  • Add: sfk ... +tgoto to jump to a label passing
  • text and stream data explicitely.
  • Chg: Syntax Change: sfk md5: now only prints the
  • checksum without filename if only a single
  • filename is given. use option -name
  • for the old behaviour.
  • Chg: Data Change: sfk getvar -line no longer
  • appends CR or LF at extracted line.
  • Chg: Data Change: web: no longer produces shell
  • return code 9 on error, but 1, to be
  • consistent with command chaining rc.
  • FIX: linux: case insensitive pattern match
  • and text extraction did not work,
  • esp. with xed or xex.
  • CHG: improved scripting: combinations like
  • sfk echo foo +setvar a=text
  • sfk echo foo +setvar a +if ... setvar b=text
  • sfk echo foo +xex ... +setvar b=1
  • no longer require 'then' in many cases.
  • Add: Simple Expressions: tag [skip] at the start
  • of a pattern now skips this text completely
  • and does not count it as a hit.
  • Chg: archive file extensions: extended the list
  • of archive files recognized by -[q]arc by
  • more office file extensions.
  • for full details type: sfk help opt
  • Chg: no longer activating archive file read
  • implicitely with most functions.
  • use -[q]arc instead.
  • Fix: ftpserv, httpserv: unwanted listing of
  • zip file contents instead of zip file itself.
  • Add: sfk addtovar, append text as lines to a variable
  • Add: variables: #(strpos(a,b)) and #(contains(a,b))
  • now searches content of variable b within
  • text of variable a.
  • Add: variables: #(begins(a,'word')) now tells if
  • text of variable a starts with word.
  • Chg: scripts: #(rsubstr(s,o,l)) now also supports
  • offset/length beyond string length,
  • producing an empty string instead of error.
  • Fix: scripts: #(substr(a,n)) with n beyond
  • length of a stopped the script with
  • "invalid variable expression".
  • now it evaluates to an empty string.
  • Add: sfk variables: function #(numlines(a))
  • to tell number of lines in variable a.
  • Add: sfk md5var, create md5 hash
  • from sfk variable content.
  • Add: sfk difflines, show text lines that differ
  • between two text files or variables
  • Add: sfk crc, crcgento, crccheck to create
  • and verify crc32 checksums (the same as
  • used in zip files).
  • Add: sfk list: now sets return code if any
  • matching files or dirs were found.
  • Add: sfk web: now sets return code 1 on any error.
  • Add: sfk sft: now sets return code if any
  • files were sent.
  • Add: del[tree] now sets return code on failure
  • Add: deltree now retries a failed folder deletion
  • 2 times with a 100 msec wait inbetween.
  • Add: del[tree] option -stoponerr to stop chain
  • execution if deletion fails
  • Chg: del[tree] now produces a warning
  • if deletion is incomplete.
  • Fix: ftp client: 30 second wait after listing
  • of directory or file download with some servers.
  • Fix: run: -printcmd was ignored.
  • Chg: zip reading: invalid zip file now produces
  • a warning instead of an error.
  • Fix: xfind, replace functions, xrename: variables
  • were not expanded for dir parameters.
  • Chg: sfk run: now shows a notice if no filenames
  • are processed on chaining.
  • Chg: xed, xrename now ignore empty pattern parameters
  • instead of stopping with an error.
  • useful for scripting with optional parms.
  • Chg: command chaining: -verbose now shows a notice
  • "chaining stops before ...: no data"
  • if execution stops due to no data.
  • Chg: command chaining: no longer showing
  • "chaining stops ...: no filenames"
  • unless -verbose is given.
  • Chg: sfk batch out.sh under linux:
  • added exit after sfk call.
  • Chg: sfk sft cput: if no files are sent
  • then -quiet no longer tells anything.
  • Add: copy -flat2 to copy all files of a dir tree
  • to an output folder with relative names.
  • Add: make-random-file -lock option, to keep
  • a file locked for testing.
  • Fix: xfind with -justrc: chaining to if
  • was not possible if nothing was found.
  • Fix: xfind -showrc produced an error.
  • Add: ifnotexist, check if a file does not exist.
  • Add: swap, reverse chain text character order
  • Add: Windows: sfk clock: pressing enter
  • now resets the relative time.
  • Add: Windows: sfk clock3 shows overall start time
  • and, when pressing Enter, relative time since
  • overall start in a second column.
  • Add: sfk clock2 to show just a relative time.
  • Add: sft client: multi file send: now showing
  • total mb info.
  • Add: xed: option -tolines to force line output.
  • Fix: xed: listing of mem leaks if given filename
  • cannot be read, or input too large.
  • Doc: end: xed -tolines reference
  • Doc: tofile: addtovar reference
  • Doc: sft: upload loop example.
  • Doc: index: reworked linux examples.
  • Doc: xfind: -showrc removed, wrong context.
  • Doc: filter: difflines reference.
  • Doc: help opt: new list of archive extensions
  • and -qarc info
  • Doc: xed: reference to sfk swap
  • Doc: sfk help chain: data tunneling notice.

New in Swiss File Knife 1.9.2 (Jul 6, 2018)

  • Sum: added sfk move to move files, getcol and tabcol to easily get a column from space or tab separated text. improvements of xed, getvar, scripting. fixed context cleanup of perline.
  • Chg: Syntax Change: sfk zip: no longer adds .zip to output filename if it contains any dot '.'. this allows to create zip files with any extension, like .odt or .jar. use option -zipext for the old behaviour.
  • Add: checkzip: option -md5 to show md5 checksums of zip file contents
  • Add: general option -more to pause output per page.
  • Add: xhexfind: option -context=n to show n bytes of context around results.
  • Add: sfk for: now supports counting down, negative start/end values, and optional step size.
  • Add: sfk zip: option -rel to strip top level folder name of filenames within zip.
  • Add: sfk xed: option -write to rewrite a given file with changed output.
  • Fix: sfk if: now supports expression starting with plus like: if "+a = +a" ...
  • Fix: perline: context and options were not fully reset between two lines, e.g. load files.txt +perline "list #qtext" -yes produced wrong output.
  • Add: sfk move: move files between two folders.
  • Add: sfk mkdir: option -forfile to create dir tree for a given filename
  • Add: scripts: #(substr(s,o,l)) now also supports variable (names) for o and l.
  • Add: scripts: #(rsubstr(s,o,l)) to get substring from the right side in left direction.
  • Add: sfk getcol, tabcol to get one column from whitespace or tab separated text. alias of sfk filter.
  • Add: sfk ping: option -every to ping every n sec.
  • Add: make-random-file: output folder creation.
  • Add: sfk times, alias for sfk list -times.
  • Add: list: now also accepts -times with 's'.
  • Add: sfk getvar: option -numline=n to get a line by number.
  • Add: zip/unzip: option -offtime to support file times which are one hour off.
  • Fix: xtext: with -to out$file it produced error -4 during simulation.
  • Fix: xtext: -to out$file no longer writes :file headers into output files.
  • Fix: rand: missing range check.
  • Fix: ifexist file stop -all ... was not possible.
  • Fix: windows mingw g++ compile.
  • Chg: sfk if: improved "need a command" error info.
  • Doc: list: example how to keep only existing filenames from a list of filenames
  • Doc: count: example for filter/setvar/count.
  • Doc: copy: reference to move.
  • Doc: xtext: how to extract text starting at a line.
  • Doc: help var: new (r)substr behaviour.
  • Doc: addcr: example for current folder.
  • Doc: sfk times example.
  • Doc: sfk zip: example to unzip/zip an .odt file.

New in Swiss File Knife 1.9.1 Revision 3 (May 29, 2018)

  • rel: 28.05.2018, Minor Update
  • sum: sfk copy new option -flat to collect all into
  • one folder with flat filenames.
  • add: copy: option -flat to copy all files into a
  • single output dir without sub folders.
  • doc: zipto: removed redundant example.
  • doc: name: copy -flat example.
  • doc: filter: -tolower/upper notice correction.

New in Swiss File Knife 1.9.1 Revision 2 (Apr 19, 2018)

  • Revision 2:
  • rel: 17.04.2018, Minor Update
  • sum: Better support for folder zipping if no sub folder contents are needed. Added script command ifexist to check if a file or folder exists.
  • fix: sfk zip: created empty subdir entries with -nosub.
  • add: sfk ifexist to check if a file or folder exists
  • fix: sfk getvar +tofile produced unwanted empty lines.
  • doc: sfk zip: option -nosub
  • doc: sfk list: option -nosub

New in Swiss File Knife 1.9.1 (Apr 19, 2018)

  • sum: The Swiss File Knife can now create zip files and extract zip files, supporting UTF-8 unicode filenames and 64 bit contents with sizes over 2 gb. This allows highly flexible file selection with the full SFK syntax, like selecting all files changed today, or all files containing a searched pattern, and to pack them into a .zip directly.
  • add: sfk zip, create zip file from folder.
  • add: sfk zipto, zip selected file list.
  • add: sfk unzip, list or extract zip file.
  • add: sfk checkzip, verify zip file content.
  • add: sfk run: quick confirm by sfk run. (with a dot) - chg: sfk getdv unter windows no longer does a direct download, but shows an info text and then opens a web browser to download dview. - add: scripts with -var: #(sys.slash) creates under windows, / under linux.
  • add: require: option -nostop to continue chain.
  • fix: sfk xfind -names ... +run etc. also printed the names to terminal
  • fix: rand: when chained with other random generator commands like make-random-file the seed was permanently reinitialized, producing redundant number sequences.
  • fix: script: command chaining stopped after md5gento, make-random-file, snapto, joinlines, bin-to-src, deblank, color, fixfile, split, join, partcopy, setbytes, media, rename
  • add: ftpserv: better windows 10 ftp client support by replying to OPTS UTF8 ON.
  • chg: sfk num: little endian conversion is now always done as 32 bits, even with small numbers. use option -small for old behaviour.
  • fix: sfk num: text output chaining did not work.
  • add: sfk num: option -show x to print just a single format instead of all formats. - chg: hexdump: now supports -off n with chain data.
  • doc: xed: [2 chars] explained.
  • doc: xed: example to swap char groups.
  • doc: run: time measurement example.

New in Swiss File Knife 1.9.1.0 (Apr 13, 2018)

  • Add: sfk zip, create zip file from folder.
  • Add: sfk zipto, zip selected file list.
  • Add: sfk unzip, list or extract zip file.
  • Add: sfk checkzip, verify zip file content.
  • Add: sfk run: quick confirm by sfk run. (with a dot)
  • Chg: sfk getdv unter windows no longer does a direct download, but shows an info text and then opens a web browser to download dview.
  • Add: scripts with -var: #(sys.slash) creates under windows, / under linux.
  • Add: require: option -nostop to continue chain.
  • Fix: sfk xfind -names ... +run etc. also printed the names to terminal.
  • Fix: rand: when chained with other random generator commands like make-random-file the seed was permanently reinitialized, producing redundant number sequences.
  • Fix: script: command chaining stopped after md5gento, make-random-file, snapto, joinlines, bin-to-src, deblank, color, fixfile, split, join, partcopy, setbytes, media, rename
  • Add: ftpserv: better windows 10 ftp client support by replying to OPTS UTF8 ON.
  • Chg: sfk num: little endian conversion is now always done as 32 bits, even with small numbers. use option -small for old behaviour.
  • Fix: sfk num: text output chaining did not work.
  • Add: sfk num: option -show x to print just a single format instead of all formats.
  • Chg: hexdump: now supports -off n with chain data.
  • Doc: xed: [2 chars] explained.
  • Doc: xed: example to swap char groups.
  • Doc: run: time measurement example.

New in Swiss File Knife 1.9.0 Revision 2 (Mar 14, 2018)

  • chg: behaviour change with wtoa, utoa: if chars fail to convert these now stop command chaining with return code 9. use option -nostop to continue processing with return code 1, without warning.
  • add: windows: general option -deacc to search text and select files accent insensitive, meaning a == A == a_accent == A_accent.
  • add: windows: listcodes support for -deacc.
  • add: windows: sfk utftoansi, ansitoutf to convert 8-bit text directly between your Ansi codepage and UTF-8 format.
  • add: windows: wtoa, utoa return code support.
  • add: listcodes: advanced option -codepage to select other codepages.
  • fix: sfk inst: files with UTF-8 BOM header were changed incorrectly, producing a compile error near line 2. now the BOM is detected and text inserted after that.
  • fix: sfk inst: line ending format lf vs. crlf is now kept
  • chg: sfk inst: now runs in simulation mode by default.
  • doc: sfk filt, xex: -case with ref to help nocase.
  • doc: sfk help unicode ref to utoa, atou. - doc: main help ref to utoa. Initial Release:
  • rel: 28.02.2018,
  • Major Update:
  • sum: SFK for Windows now supports case insensitive search and file selection within the codepage of your Windows system. Depending on your codepage this allows to search umlauts, accents, cyrillic or greek characters case insensitive. Added functions to convert text from and to UCS-2 wide character data.
  • add: windows: case insensitive search and file selection within the codepage of your windows system. depending on your codepage this allows to search german umlauts, french accents, cyrillic and greek characters case insensitive.
  • add: sfk help nocase, about case insensitive search.
  • add: sfk listcodes, list all characters that can be searched case insensitive with your Windows codepage
  • add: sfk help chars, about locale specific characters
  • add: general option
  • nocasemin to match only latin chars a-z case insensitive without any accents.
  • add: windows: sfk wtoa and atow, convert UCS-2 wide character text to 8-bit Ansi codepage text and vice versa.
  • add: sfk wtou and utow, convert UCS-2 wide character text to 8-bit UTF-8 text and vice versa.
  • chg: windows: sfk chars output format changed, now showing both Ansi and OEM code, and character name where available, with a table header. use option -min for the old minimal format
  • fix: xex: option -case was ignored. fix: xtext, xfind: error -1 on output with files of 2 or 3 gbytes size.
  • add: xfind, xtext: now shows an improved progress indicator by default. use -quiet for old behaviour.
  • add: sfk make-zero-file, create a file full of zero bytes to clean unused space on a filesystem.
  • add: sfk status: new field layout=n to change SFKTray layout to 2, 4 or 9 slots display. requires SFKTray 1.0.2.
  • add: windows: sfk prompt now converts input from dos to ansi codepage by default
  • add: windows: sfk script option -dos to load DOS/OEM codepage encoded script files
  • fix: windows: delayed terminal after filtering of text content with special characters.
  • add: sfk strings: option -allchars to extract all printable chars from binary files.
  • add: snapto: option -binallchars to extract all printable chars from binary files.
  • add: sysinfo: display of SFK_CONFIG variable.
  • add: xtext: display of written file with -to outdir$file.
  • fix: xtext: error message with -to outdir$file as long as in simulation, without text output.
  • chg: option -nocconv can now be used locally per command.
  • dep: option -iso is deprecated/ignored.
  • dep: option -umlauts is deprecated/ignored.
  • doc: main help title changed from: The Swiss File Knife File Tree Processor to: The Swiss File Knife Multi Function Tool.
  • doc: sfk index, name now reference sfk home.
  • doc: sfk setvar, load, storetext, stop in main help.
  • doc: wtoa, wtou in main help.
  • doc: xrep: notice to use [eol] to replace line endings.
  • doc: filter: reference to help nocase, help unicode. - doc: find, replace: reference to help nocase. - doc: general option -binallchars - doc: sfk ose: xfind help did not show expression syntax. - doc: sfk ren: top reference to sfk renfile. - doc: sfk copy: single file copy example.

New in Swiss File Knife 1.8.9 Revision 2 (Jan 13, 2018)

  • Minor Update:
  • sum: improved scripting error messages. better rename support in scripts. added filter option to skip first lines.
  • add: sfk renfile, rename just a single file, for use in sfk scripts.
  • add: filter -skipfirst=n to skip first n lines.
  • chg: -nocol given locally at a command no longer changes the global color mode.
  • chg: scripts: every command given like +cmdname can now be used in a script, no longer producing the error "does not support input chaining".
  • add: sfk ren, xren: option -quiet to print nothing.
  • add: sfk ren, xren: now tells number of changed files. option -[no]stat to show or hide statistics.
  • add: sfk rmtree: option -quiet to print nothing, option -stat to show statistics with -quiet.
  • fix: scripts: unknown commands were ignored silently, they now produce an error "unknown command".
  • fix: -memlimit=3000 did not work.
  • fix: sfk prompt help text.
  • doc: improved prompt example.

New in Swiss File Knife 1.8.9 (Dec 7, 2017)

  • Major Update. Read the changelist for details. Zip File Contents:
  • Binaries of Swiss File Knife Base, the multi function command line tool for Windows (XP to Windows 8), Intel Linux (current and old releases), Apple Macintosh (i686 and PPC) and ARM systems like Raspberry Pi.
  • Sourcecode and build scripts of SFK Base, allowing compilation under Windows and Linux.
  • Some documentation, example and test files.
  • Major Update
  • sum: improved scripting with if begin ... endif. better display of windows filenames with more codepages. sfk rand to create random numbers. sfk prompt to allow user input. fixed xex return code handling and stop of script after sfk status.
  • chg: windows: improved display of european filenames using non latin characters in the own codepage.
  • chg: sfk batch tmp.bat: the example is now a short number game with status lights.
  • add: scripting: +if expr +begin ... +endif to execute multiple commands as one block if given expression is true.
  • add: scripting: easy check if a variable text contains a phrase by: if "#(contains(mystr,'text'))"
  • add: if: support for if "rc<>1" to check if command rc is different to a value.
  • add: sfk rand to create a random number.
  • add: sfk prompt to ask for user input.
  • chg: sfk status: no longer requires protocol version.
  • fix: xex: return code was always 1 if previous command set it, no matter if xex found data.
  • fix: fixfile: option -dewide displayed invalid date 1900... in simulation preview.
  • fix: possible crash on setvar with empty value.
  • fix: status: silent stop of command chain with some following commands like +list
  • chg: windows OSE compile support for MSVC 14.
  • chg: chaining from +tell to other commands like +setvar no longer requires +then.
  • chg: improved tracing of variable expansion by -debug like +tell -debug "#(strlen(a))" - doc: xex: how to check if a variable contains a word.
  • doc: help var: how to search a variable in a variable.

New in Swiss File Knife 1.8.8 Revision 2 (Sep 22, 2017)

  • MINOR UPDATE:
  • sum: improved scripting with perline and getvar commands.
  • add: perline: option -setvar x to put whole line text
  • into variable x, for easy call of sub functions
  • without parameters.
  • add: getvar: option -line to extract first line
  • matching a pattern. allows fast table lookups
  • by a unique id if text is in a variable.
  • add: hexdump: option -nolf for -pure format.
  • doc: touch: how to touch a single dir.
  • doc: filetime: how to list a single dir.

New in Swiss File Knife 1.8.8 (Sep 22, 2017)

  • Initial Release - MAJOR UPDATE:
  • rel: 04.09.2017, Major Update
  • sum: added new GUI tool to display status infos
  • by several lights in the system tray.
  • added sfk status command to control these lights.
  • added more flexible rename for files and folders.
  • add: sfk xrename, a flexible rename for files and
  • folder names, supporting full SFK Simple Expressions
  • and many patterns per command.
  • add: sfk status, send a colored status to the SFKTray
  • Windows GUI tool for display.
  • fix: fromnet: when used with command chaining
  • it called following commands endless even with
  • no input at all. now e.g. fromnet +filter ...
  • will block until actual input data is received.
  • use new option -nowait for old behaviour.
  • fix: sfk web: input conflict error after some
  • commands like setvar.
  • chg: web download limit default is now 30 mb.
  • add: sfk if: warning on "rc = 0" comparison which
  • should be "rc=0".
  • chg: syntax change: stat: further command name chars
  • like "sfk statistics" are no longer supported.
  • doc: sfk rename: -spat example and xrename reference.
  • Source: readme, updated 2017-09-21

New in Swiss File Knife 1.8.7 (Jul 7, 2017)

  • rel: 06.07.2017, Major Update
  • sum: syntax corrections with sfk web, addhead and addtail.
  • easier web automation in sfk scripts.
  • CHG: SYNTAX CHANGE: command +web no longer uses chain input
  • text by default, so commands like
  • sfk filter ... +web ...
  • will no longer work. use instead +tweb like
  • sfk filter ... +tweb ...
  • to explicitely read chain text, or set global option
  • -cweb for the old behaviour. if you need your old scripts
  • to run without any changes, set environment variable:
  • SET SFK_CONFIG=cweb
  • reason: in sfk scripts +web is used most of the time
  • with an URL given as a parameter, but not read from
  • chain text input, so permanent writing of +then web
  • was required. the new default makes web automation
  • scripts much easier.
  • CHG: OUTPUT CHANGE: sfk addhead, addtail no longer
  • add blanks between added words by default.
  • use option -blank for the old behaviour.
  • add: sfk addhead, addtail: command chaining support.
  • add: sfk load: load text or data for further processing
  • in a command chain. just like xex or filter,
  • but more intuitive in scripts if you do not
  • want to apply any filtering.
  • add: web: -delay option to wait per request
  • add: tweb, an alias of web that reads url's
  • from chain text of previous command.
  • add: global options -cweb and -nocweb to change
  • +web chain input default.
  • add: sort: -skiphead to keep table headers
  • add: echo: option -joinline to reformat quoted multi line
  • parameters with full trim. includes option -noblank
  • which is now deprecated but kept for compatibility.
  • add: sfk data: now supports multi line template in scripts.
  • add: sfk data: support for $minute, $second
  • add: doc: sfk help chain, script: reference to load.

New in Swiss File Knife 1.8.6 Revision 3 (Jun 10, 2017)

  • rel: 09.06.2017, Minor Update
  • sum: detail improvements of calc and partcopy.
  • add: sfk partcopy: option -fromtoinc to include the end offset in output.
  • fix: sfk calc: expressions starting with a negative number were not supported.

New in Swiss File Knife 1.8.6 (May 31, 2017)

  • sum: added easy variable output formatting like #(05i) which pads i to 5 characters with leading zeros. calculator now supports long expressions with many values.
  • add: variable formatting on output in C-style notation like #(3.5varname) allowing to fill text with leading blanks or zeros, and to limit text to a given number of characters. for details see "sfk help var"
  • add: sfk run, perline: now support ufile, upath or qufile, qupath to use unix slashes "/". useful to create html output.
  • add: sfk calc: now supports long expressions with more than two values.
  • chg: sfk calc: if chain input is used as #text it now fills in the whole text, no longer ignoring characters after first whitespace.
  • fix: sfk touch: did not support chaining to following commands.
  • fix: sfk httpserv: truncated bad formatted url's like "foo bar.txt" with unencoded blank as "foo". now these produce code 404 only.
  • doc: sfk for: example how to copy files.
  • doc: sfk perline: example how to create an html file listing images.
  • chg: variable functions lpad, rpad are no longer documented but still supported. padding by the new C-style notation is easier.

New in Swiss File Knife 1.8.5 Revision 3 (May 21, 2017)

  • Rel: 18.05.2017, Minor Update
  • Sum: sfk version output fixed, which was wrong especially under linux.
  • Fix: sfk version: did not work esp. on linux.
  • Add: ftpserv: console connect time infos.

New in Swiss File Knife 1.8.5 Revision 2 (May 7, 2017)

  • Sum: reduced ftp terminal output on error replies.
  • Chg: ftp server: no longer printing 5xx replies to terminal by default. added option -showerro to print them, except for 550 no such file.
  • Chg: ftp: protocol info is now shown only with
  • Ftp(server) but not with sft commands.
  • Doc: xed: example how to replace a line by file content.

New in Swiss File Knife 1.8.5 (Apr 27, 2017)

  • Sum: fix of FTP server which blocked folder transfers with many ftp clients. rework of FTP server and client for improved connectivity under Windows.
  • Improved scripting by for loop.
  • Added listle to list line end infos for text files.
  • Detail improvements of udpdump, list, setbytes.
  • CHG: FTP Client Change under Windows: when using "sfk ftp" with an sfk ftp server, via port 21, the client now uses plain FTP protocol by default to avoid firewall restrictions. use option -sft or SFK_CONFIG=usesft for the old behaviour if no firewall interferes.
  • FIX: ftp server: transfer of folders with most ftp clients was blocked as CWD /mydir/ was not possible, since sfk 1.8.4. (side effect from dir traversal fix)
  • Fix: ftp server: unexpected close connection errors at client on QUIT command. QUIT now produces a reply 221 before closing the connection.
  • Fix: ftp client: missing display of error reply from server on ftp put, mput, sel ... +ftp mput.
  • Add: ftp client: options -raw to force plain ftp and -sft to allow sft even via port 21.
  • Chg: ftp server: 5xx error replies are now always shown on console unless -quiet is given.
  • Chg: ftp: now tells protocol used (ftp/sft) on every file transfer.
  • Add: ftp server: display of verify in verbose mode.
  • Add: sfk for, like for var from s to e +... +endfor.
  • Add: sfk listle, list line end infos for text files.
  • Fix: sfk for windows: absolute paths with forward slash like /tmp were not detected with some commands like sfk sel /mydir +copy -ltarg /outdir
  • Add: sfk setbytes: option -repeat=n to repeat data n times.
  • Add: sfk list: option -abs to list full absolute paths.
  • Add: sfk udpdump: now accepts both "," or blank separator for multi ip mask.
  • Add: sfk udpdump: warning on wrong chars in ip mask.
  • Chg: sfk view: changed some colors to look more like the white color theme.
  • Fix: sfk ask -abs used only -ab
  • Doc: sfk replace: help now always lists the possible shell return codes.
  • Doc: sfk script: improved infos on parameter name collision.
  • Doc: sfk filter: -format examples improved.
  • Doc: sfk udpdump: examples for multi ip filtering.
  • Doc: sfk xfind: windows return code handling example.
  • Doc: sfk addcr/remcr: reference to listle.
  • Doc: sfk ftpserv and ftp: help text rework.

New in Swiss File Knife 1.8.4 Revision 2 (Mar 11, 2017)

  • Minor Update:
  • sum: version command can now list standard windows version infos contained in .exe files.
  • chg: hextobin: no longer tells conversion statistics when output is sent to another command
  • add: sfk version: support for windows binary version infos. - doc: encode/decode was not contained in dumphelp. Initial Release:

New in Swiss File Knife 1.8.4 (Mar 1, 2017)

  • sum: security fix for windows ftp and http server. added encoding and decoding of base64, hex and url text formats. added setbytes command to set bytes directly in a file. improved scripting.
  • FIX: ftpserv and httpserv under Windows: with option -rw write to a forbidden absolute path like C:thedir... was not blocked.
  • CHG: Syntax Change: sfk ... +hexdump no longer expects filename lists from previous commands, but only text and binary data. use +hexfile or +fhexdump for the old behaviour. this fixes issues that data sent by the command chain was always misinterpreted as filename lists, producing file open errors.
  • add: sfk clock, permanent display of absolute and relative time.
  • add: sfk hexdump: automatic highlight of line end chars with pure text input data. fix: sfk for windows: repeated calls of sfk sft ... in scripts not possible.
  • add: sfk old, alias for sfk list -old to show oldest files of a folder. - add: sfk small, alias for sfk list -small to show smallest files of a folder.
  • add: sfk chars now supports command chain input.
  • add: ftp client in sft mode: display of 55x error replies on file send, also without verbose.
  • add: sfk encode and decode, convert data to and from base64, hex or prefixed hex data. - add: sfk setbytes, write a byte sequence into a file at a given offset.
  • del: the undocumented +text and +files keywords in command chaining are no longer supported. - chg: sfk base: sfk sel ... +extract was not enabled.
  • chg: sfk base+xd: sfk sel ... +xrep demo was not enabled.
  • chg: echo -literal -noline ... followed by a command accepting binary data, like xed, no longer appends (CR)LF.
  • add: echo -pure as an alias for -literal -noline, to prepare chain input data as unchanged as possible.

New in Swiss File Knife 1.8.3 (Jan 22, 2017)

  • sum: detail improvements for index file handling, udp message sending, text filter, windows/linux unified scripts. easier scripting by sfk tell which never sends given text to following commands. scripts can now call more nested sub functions. bug fixes for run, tail, hexdump.
  • chg: option -upat now also support "/" for start of name comparison as in -subdir :/tmp or -file :/tmp - chg: "sfk lindex" renamed to "sfk index" for easier use. sfk lindex is still supported for compatibility.
  • add: "sfk iname" renamed to "sfk name" for easier use. sfk iname is still supported for compatibility.
  • add: sfk udpsend: if a short ip is expanded the full target ip is now shown. option showip to force showing of ip instead of host in sent info.
  • add: sfk ip: optional expansion of given short ip. chaining support to pass ip text to other commands.
  • add: sfk filter -toupper, -tolower to convert a-z to upper- or lowercase. does not convert any special characters like accents or umlauts.
  • add: file selection option -tomake outdir$base.ext to select all files having no or an older counterpart file in output folder outdir. see "sfk run" for an example of .wav to .mp3 conversion with ffmpeg.
  • fix: sfk udpsend, tonetlog could net send to different targets in the same command chain or script.
  • add: sfk tell, same as echo but only prints to terminal and never sends given text to following commands, allowing scripts with fewer "+then" statements.
  • add: sfk data, create random test data records.
  • chg: reduced stack load per call and perline allowing more nested calls.
  • fix: sfk dumphelp: now prints main help text first.
  • fix: sfk run with a single string containing # or $ did nothing.
  • fix: sfk tail under windows: handling of files > 2 GB without option -altsize.
  • fix: sfk ... +hexdump unexpected dump of all files of current folder.
  • chg: sfk knxdump, knxsend: GA support up to 31/7/255, support to send to unicast address.
  • doc: updated list, run, help opt, echo/tell, xed, filter, media, call, perline, dupfind

New in Swiss File Knife 1.8.2 (Jan 22, 2017)

  • sum: sfk xfind, a powerful text search tool for the command line, is now open source. compared to grep it features an easy, human readable pattern syntax based on the english language. improved scripting by string functions like substr and direct access to environment variables.
  • chg: sfk OSE: xfind, xhexfind, xtext and extract are now open source.
  • add: sfk variable functions like #(substr(a,3,2)). type "sfk help var" for details. - add: access to environment variables like #(env.varname). type "sfk help var" for details.
  • chg: error text "incomplete replacement pattern" changed to "imcomplete search pattern" with improved correction hints.
  • fix: ftpserver with -usedir: empty listing in ftp clients like cyberduck due to invalid rwx attribute infos.
  • fix: sfk ose compile: sfkbase.hpp did not define SFKOSE.
  • doc: xfind, xtext help reworked. improved "see also" list, -enddir before -text is not needed, -text is listed before -pat.
  • doc: marked find, hexfind as basic commands with reference to xfind, xhexfind.

New in Swiss File Knife 1.8.1 (Sep 29, 2016)

  • sum: added support for sfk variables, allowing to store data from a command and to reuse it in other commands. massive improved scripting.
  • ADD: sfk variables. type "sfk help var" for infos. allows to store data produced by one command, and to reuse it in another command like #(name)
  • ADD: sfk perline, run sfk commands per text input line. similar to sfk run, but without starting an external program, and with full access to sfk variables produced by previous commands.
  • CHG: Syntax Change: sfk call, if: no longer clears chain text after command. call will now flush chain text before entering the label.
  • CHG: Syntax Change: sfk echo ... +call +xex no longer passes text of echo as chain data through to xex. use tcall for that.
  • CHG: Syntax Change: sfk gettext output changed with text produced by storetext -append. more below.
  • add: sfk samp http, create an example script for web access automation.
  • add: sfk xed, xex, xreplace, simple expressions: setvar name]...[endvar] to set an sfk variable, getvar name] to fill in data from an sfk variable.
  • add: sfk xed, simple expressions: keyword [ortext] to search literals OR combined. can only be used between literals.
  • add: sfk xed, simple expressions: keyword [keep] to search text that should be kept in input, without consume or replace.
  • add: sfk echo -lines to print every string as one line.
  • add: sfk xed: option -firsthit to use only first matching result.
  • add: sfk filter: option -line=n to read nth line from input.
  • add: sfk web: option -showreq, similar to -status.
  • add: sfk find: option -head=n to read only n lines.
  • add: sfk batch, alias of sfk samp sfkbat. may also create .sh files under windows.
  • add: sfk xf, alias for xmlform.
  • fix: command chaining: unexpected drop of data when chaining to echo, fromclip, var, gettext, getvar. e.g. sfk echo foo +echo bar +tofile out.txt dropped "foo", now it is printed.
  • add: command chaining: +tcall to consume text data and +tend to return text data.
  • fix: sfk script -from begin: if script contained a label begin2 this was called.
  • chg: sfk xex, xed: improved help examples, separate examples for xex and xed.
  • chg: sfk samp sfkbat, sfkbash now use %0 or $0 instead of the script filename.
  • chg: Simple Expressions: now support zero length tokens like in "/[start][0 chars][1 char]/"
  • chg: sfk samp: path now allowed in output file with some language types.
  • add: sfk xex, xed: option -justrc to just set return code without printing any output.
  • add: sfk ... +tovoid to drop current chain text.
  • add: sfk stop: optional text to print, info on rc 9 to stop a script from within call. dump of chain text on rc >= 9.
  • add: sfk call: improved help text.
  • FIX: sfk script, call: missing parameters produced errors or even crashed. now these are just empty.
  • fix: sfk ... +run was blocked with http:// url's.
  • fix: sfk web -status=... +xex didn't work.
  • fix: sfk echo: quoted multi line parms output contained unwanted CR characters and trailing blank line.
  • fix: sfk web: always produced rc 9.
  • fix: run -stoprc: did not work in a script.
  • fix: script: +if ... stop -all didn't work, as "if" misinterpreted options.
  • fix: script: +stop no longer requires +then stop.
  • fix: gettext: missing linefeeds on terminal output after multiple storetext -append. workarounds appending with "n" must be changed.
  • fix: sfk version -own +filter didn't work.
  • fix: expression part info didn't show # chars.
  • chg: sfk samp sfkbat, sfkbash new templates.
  • add: sfk knxsend: support for alternative IP group,
  • send of search request.
  • add: sfk knxdump: option -verbose to print search response verbosely.
  • doc: extended echo help.
  • doc: reworked help for sfk script.
  • doc: help text for sfk then.

New in Swiss File Knife 1.8.0 (Aug 31, 2016)

  • sum: sfk xed, a powerful stream text editor, is now free and Open Source. it allows text and binary editing with a simple, human readable syntax. improved handling of multi line parameters in sfk scripts
  • CHG: SYNTAX CHANGE: sfk script and sfk label: quoted multi line parameters are now trimmed by default, no longer requiring option
  • qtrim. see "sfk script" for details. scripts requiring the old behaviour may now need option
  • qraw after "sfk label".
  • chg: the SFK Mobile Booklet was fully reworked and now covers the latest SFK version, including an 38 page tutorial. see stahlworks.com/pdf for details.
  • chg: sfk script: support for quoted multi line parms with filter
  • rep, filter -form, web, wget, rename
  • add: sfk windows: clipsrc, clipphp, clipjava to convert clipboard text to source code. type "sfk bin-to-src" for documentation.
  • fix: linux: autoconf compile didn't work.
  • fix: compile: -DSFKOSE no longer necessary to produce a Base/OSE binary info.
  • fix: web -nodump missing option documentation.
  • fix: xmlform: unwanted blank lines in output, lost lines on some multi line tags.

New in Swiss File Knife 1.7.7 (Jul 30, 2016)

  • sum: easy web data access with functions sfk web, wfilter, xex. added sfk calc to do simple calculations. improvements of wget, ftpclient, udpdump, find, xfind, script. diverse bug fixes.
  • inf: Compatibility Notice: sfk scripts with quoted multi line parameters will change their default behaviour in the future. see "sfk label" options -qtrim and -qraw.
  • dep: Deprecation Warning: sfk webreq should no longer be used. use sfk web instead.
  • chg: Compatibility Notice: sfk pause: no longer sets a non zero shell return code if Esc key is pressed (which was undocumented).
  • add: sfk update: check for SFK updates.
  • add: sfk pause: option -keyrc to set the shell return code by ascii code of the pressed key. - add: sfk filter: option -head=n to read only first n lines of text files.
  • add: sfk filter: option -tail=n to read only last n lines of text files.
  • add: web access support with sfk filter, xex. help text examples for web access.
  • add: xe: sfk xreplace: option -astext to print search/replace hits as plain text.
  • add: sfk web, send a simple web request. new implementation replacing webreq.
  • add: sfk label: option -qtrim to strip whitespace from quoted multiline parameters.
  • add: sfk ftpserv: support for environment variables SFK_FTP_SUSER, SFK_FTP_SPW, SFK_FTP_SRUNPW which are used only by sfk ftpserv, not sfk ftp.
  • add: sfk ftp: support for environment variables SFK_FTP_CUSER, SFK_FTP_CPW which are used only by sfk ftp, not sfk ftpserv.
  • add: main help now lists the most important active environment variables.
  • add: full documentation of option -upat for using unix patterns : and # under windows.
  • add: option -upat2 to use sfk linux wildcard % instead of * under windows
  • add: sfk windows: set SFK_CONFIG=upat or upat2 support to use unix syntax in bash files - add: sfk for windows now also supports environment variable option SFK_CONFIG=wildstar:c to support a different wildcard character.
  • add: sfk calc, do a simple calculation of two values.
  • add: xfind, xhexfind: option -names to show just the names of files containing hits. - fix: udpsend: no error on missing port or data.
  • fix: find: option -justrc produced blank lines.
  • add: udpdump: option -from now supports multiple ip patterns separated by comma.
  • add: udpdump: option -notfrom.
  • add: wget: auto expansion of url to http://url
  • chg: ftp client: "server speaks sft" message is now shown only with -verbose.
  • chg: ftp client: "using SFK_FTP_PW" message is now shown only with -verbose.
  • add: wget: option -maxwait to stop on timeout.
  • opt: wget: no longer sends head request.
  • add: httpserv: -raw option to send content without any reply headers.
  • fix: wget: download from a primitive server that sends no http headers produced incomplete first text line.
  • fix: sfk gettext: did not work in many cases.
  • chg: sfk if, sfk call: no longer consume chain text without any output.
  • add: sfk fromclip -h: example how to append clipboard changes to a logfile in a loop.

New in Swiss File Knife 1.7.6 Revision 3 (May 3, 2016)

  • fix: command chaining: failed to work with sfk ping ... +then webreq +filter ... now every chain i/o type after +then is ignored.
  • add: webreq: option -maxwait=n to wait up to n msec for a connection.
  • add: ping: option -quiet=2 to not show OK etc

New in Swiss File Knife 1.7.6 Revision 2 (Apr 24, 2016)

  • fix: sfk alias didn't work.
  • fix: sfk ping help: first example didn't work.
  • chg: improved help on output chaining error message.
  • chg: improved help on input chaining error message.
  • chg: udpsend: no longer use gethostbyname on pure ip's.
  • chg: global rework of all gethostbyname calls (setaddr).
  • add: sfk for windows: option -noesckey to disable
  • stop by escape key.

New in Swiss File Knife 1.7.6 (Jan 15, 2016)

  • Added function fixfile under windows to correct filenames with bad characters and time. added function num to print a number in many formats.

New in Swiss File Knife 1.7.4 Revision 4 (Apr 3, 2015)

  • fix: sfk head -follow did not work.
  • chg: help text: separated head and tail documentation.
  • add: the free sfk for ARM linux is now a Base+XD edition with xfind, xtext and extract command.

New in Swiss File Knife 1.7.4 Revision 2 (Feb 19, 2015)

  • fix: sfk httpserv security: buffer overflow allowing remote code execution when sending large request.
  • fix: sfk httpserv security: with option -deep it did not detect path traversal when requesting "/file.txt".
  • fix: sfk httpserv security: accepted files for upload without option -rw.
  • add: httpserv, ftpserv help text: reworked notice that these are only for trusted environments.
  • fix: sfk help select: wrong example text.

New in Swiss File Knife 1.7.4 (Feb 10, 2015)

  • CHG:
  • CHANGE OF DEFAULT OUTPUT OF: xhexfind, hexfind if a full /fromtext/totext/ pattern is given the hexdump output now shows the replaced output text by default. use option -dumpfrom to display the fromtext (search hits) in output.
  • CHANGE OF SIMULATION OUTPUT OF: replace, xreplace, extract 1. simulation mode now shows a hex dump by default instead of just statistics. use -nodump for the old behaviour. 2. hex dump output now shows the replaced output text by default. use option -dumpfrom to display only the fromtext (search hits) as it was default before. option -yes behaves as always, not showing hexdumps but only statistics of the number of changes.
  • STRICTER PATTERN PARSING WITH: replace, extract, xreplace a pattern like /from/to with missing "/" separator at the end now stops with an error.
  • add: sfk rename, a flexible mass file rename using rename expressions.
  • add: sfk xmlform: simple xml line text reformatter for convenient viewing.
  • fix: linux default color with dark background: theme:black no longer uses grey but now the terminal default color by sequence {ESC}[0;0m
  • fix: linux: gindex, iname used wrong home folder.
  • fix: gindex: if user supplied relative dir names subsequent iname produced wrong results.
  • fix: gindex: options -size or -qarc caused listing of wrong folders.
  • add: snapto: option -raw to collect faster.
  • chg: hexdump output colors reworked.
  • chg: sfk cmd: now uses the actual current sfk binary name instead of just "sfk" for the created command
  • fix: fromclip: crash on missing data.
  • add: base+xd: demo of xreplace allowing output preview without writing to files.
  • chg: sfk replace: unreadable files which are skipped no longer produce an error but a warning.
  • chg: small syntax change: sfk chars now only accepts char or chars as command name.
  • chg: help text: full rework of web references.

New in Swiss File Knife 1.7.3 (Jan 9, 2015)

  • CHG:
  • SYNTAX CHANGE: by default, sfk xfind and xtext now show complete text lines containing one or more search hits. add option
  • pure to show only search hits as before, or change defaults by an environment variable SET SFK_CONFIG=xfind:pure,xtext:pure sfk xtext is now an alias of xfind -nobin, i.e. it searches only in text files.
  • COMPLETE REWORK OF SEARCH FUNCTIONS: xfind, xtext, xhexfind, extract. output may look completely different now. many new options. reworked help text. CHECK YOUR BATCH FILES if the new outputs still work for you as expected.
  • SYNTAX CHANGE: sfk find: patterns starting with "-" are no longer supported directly but must be prefixed by "\". options can now be given after search patterns.
  • add: sfk csvtotab to convert comma separated data.
  • add: sfk tabtocsv to convert tab separated data to csv.
  • add: sfk filter -trim, -ltrim, -rtrim to remove blanks and tab characters at start or end of lines.
  • add: sfk fromclip: option -ltrim and alias "sfk lclip" to remove blanks and tabs at start of lines.
  • add: sfk xfind/xex -bylinelist to specify a simplified list of search terms without any totext.
  • add: sfk extract is now available in base/xd.
  • add: sfk view: improved help if dview is not found.
  • add: xed, xex: direct reading of zip file entries.
  • chg: sfk view: now passing through all non sfk options and parameters as is, like "-tab 8". parms with blanks are enquoted.
  • chg: source code cleanup: removed patch.cpp and inst.cpp, integrated them into sfknet.cpp and renamed this to sfkext.cpp for easy compilation.
  • chg: default replace color with theme:white now purple on windows and linux.
  • chg: sfk xex -showparts now shows only part numbers then stops processing.
  • chg: xreplace: improved [lstart] handling.
  • fix: xreplace: character classes at start of pattern with a zero min length like in "/[0.100 white]foo/" did not work in case of zero length hit.
  • chg: hexfind: now using wide hexdump.
  • chg: xed, xex: without any patterns it now passes through input unmodified.
  • fix: filter +xed produced LF i/o CRLF under windows.
  • fix: (x)hexfind: did not show absolute offset in file.
  • fix: (x)hexfind: ignored windows console width.
  • fix: extract, xfind -tofile: -nofile was ignored.
  • add: sfk cmd n, print a command n from the help text as one long line.
  • add: web reference info per command.

New in Swiss File Knife 1.7.2 Revision 3 (Oct 9, 2014)

  • fix: addcr, remcr: did not work with mixed format files.
  • dep: option -utf is now deprecated, use -wchar instead as this does not at all decode UTF-16 but just reads plain ASCII from wide character files.
  • fix: xe: non speaking error 21212902 on missing -usetmp.

New in Swiss File Knife 1.7.2 Revision 2 (Oct 9, 2014)

  • chg: sfk tail: extended example to show how to stop file filtering on a specific text.
  • add: chaining support commands: storetext and gettext to remember the current chain text.
  • add: chaining support command: stop to finish execution within a chain.
  • add: sfk list -kb[ytes], -mbytes, -gbytes to list file sizes in larger units then bytes.

New in Swiss File Knife 1.7.2 (Oct 9, 2014)

  • CHG: lf-to-crlf, crlf-to-lf, addcr, remcr SYNTAX CHANGE: now runs in simulation mode if a directory is given. if a single filename, or a list of filenames is given then conversion is done immediately.
  • chg: sfk base+xd: xfind and xex now support full reformatting of found text patterns by [part...] statements.
  • add: addcr, remcr: no longer rewriting files that need no changes.
  • chg: addcr, remcr: no longer adding a line ending at the last line if there was none. added option forceend to always force a line ending at the last line.
  • fix: addcr, remcr: truncation of binary files. now all binary files are skipped.
  • fix: xfind: crash on incomplete "chars of" pattern.
  • chg: sfk source files now all with lf-only line endings.
  • add: sfk help compile info how to compile sfk on linux.

New in Swiss File Knife 1.7.1 Revision 2 (Apr 16, 2014)

  • add: base+xd and xe: sfk xfind, search in text and binary files using wildcards and sfk expressions, with colored text output to terminal.
  • dep: deprecated: sfk find -text should no longer be used to read only text files, as the option
  • interferes with xfind -text patterns. use sfk ftext to read only text files.
  • fix: compile warnings: unsequenced access
  • Initial Release:
  • CHG: sfk find: no longer applying soft word wrap at characters .,; by default. use option -delim=.,; for old behaviour.
  • chg: sfk find: search within binary files: no longer lists a previous and current line but joins
  • them automatically for output.
  • add: sfk find: option -delim to specify delimiters for soft word wrapping.
  • add: sfk split: option -text to split text files at line boundaries.
  • fix: sfk ftpserv: handling of ALLO command. this now produces a normal 200 OK reply.
  • fix: sfk find: search for long strings failed even with -wrap(bin)=n change due to limited
  • internal buffer sizes. now result strings can be up to 800 characters approx.
  • fix: sfk find singleFile pattern +command chaining did not work.
  • chg: sfk xhexfind: -quiet now also disables the files checked info.
  • add: sfk filter: -toutf to convert iso-8859-1 text to utf-8.
  • add: sfk runloop: now accepts $$ to print the character $ in output text.
  • chg: sfk runloop: no longer tells "error" on non zero rc from called program.
  • fix: sfk entab did not show help text.
  • chg: sfk entab: complete rework, now writing only files containing changes.
  • fix: fixed some compile warnings.

New in Swiss File Knife 1.7.1 (Mar 20, 2014)

  • rework of sfk find, entab. small improvements of sfk split, ftpserv, filter, runloop.
  • CHG: sfk find: no longer applying soft word wrap at characters .,; by default. use option -delim=.,; for old behaviour.
  • chg: sfk find: search within binary files: no longer lists a previous and current line but joins them automatically for output.
  • add: sfk find: option -delim to specify delimiters for soft word wrapping.
  • add: sfk split: option -text to split text files at line boundaries.
  • fix: sfk ftpserv: handling of ALLO command. this now produces a normal 200 OK reply.
  • fix: sfk find: search for long strings failed even with -wrap(bin)=n change due to limited internal buffer sizes. now result strings can be up to 800 characters approx.
  • fix: sfk find singleFile pattern +command chaining did not work.
  • chg: sfk xhexfind: -quiet now also disables the files checked info.
  • add: sfk filter: -toutf to convert iso-8859-1 text to utf-8.
  • add: sfk runloop: now accepts $$ to print the character $ in output text.
  • chg: sfk runloop: no longer tells "error" on non zero rc from called program.
  • fix: sfk entab did not show help text.
  • chg: sfk entab: complete rework, now writing only files containing changes.
  • fix: fixed some compile warnings.

New in Swiss File Knife 1.7.0 (Feb 12, 2014)

  • add: sfk fromnet: print incoming network text sent by sfk tolog or tonetlog
  • chg: sfk tonetlog: one msec of delay after each package sent, by default, to avoid package losses on long text transfers. can be changed by option -delay=n
  • add: sfk tonetlog: options -nolf and -usecr option -noline is deprecated
  • add: sfk filter, sfk tonetlog: option -toiso for simple conversion of UTF8 text to ISO-8859-1
  • add: sfk chars: option -fromutf to list code points of characters from UTF8 sequences
  • add: udpdump: -tofile output option
  • add: netlog: extended help text with sample scripts how to compile remote and receive output
  • chg: macintosh: optimized color scheme
  • fix: udpdump ... -data missing highlight of text
  • fix: sfk xed ... +run, +ffilter etc. did not work

New in Swiss File Knife 1.6.9 (Dec 21, 2013)

  • CHG: SFK REPLACE: CHANGE IN DEFAULT BEHAVIOUR WHEN USING \xnn SLASH PATTERN CODES. By default,
  • hex codes like \x41 are NOT treated as characters and therefore are NOT searched case insensitive,
  • even if they represent a character code. In other words, \xnn is always treated as BINARY
  • and only the EXACT code nn is searched. This can be changed by option -xchars. CHECK YOUR BATCH FILES if you need the old behaviour. If \x41 (ASCII code for A) should always find both
  • A and a you may also set an environment variable: SET SFK_CONFIG=xchars
  • add: base/xd: free demo of sfk xhexfind and xtext to search in text and binary files using wildcards and SFK Expressions.
  • fix: sfk replace ... +replace crashed.
  • chg: sfk replace ... -to outdir\$file: now always creating output directories that don't exist.
  • chg: sfk replace: now supporting single dir parameter, i.e. sfk replace mydir "/fromtext/totext/"
  • CHG: sfk hexdump output to terminal: by default the filename is now prefixed by ":file " to be compatible to hextobin. use option -rawname for old format.
  • CHG: sfk hextobin: stricter input format handling considering >< and # delimiters. use option
  • -fuzzy for old behaviour.
  • chg: sfk sel ... +sft mget: no longer requiring "." after mget to download to current directory.
  • add: sfk tcpdump, udpdump: option -maxdump to dump only the first n bytes of incoming messages.
  • add: sfk replace with -to or -tofile: option -force to create output directories.
  • add: sfk sft cput, cget alias for mput/mget -up.
  • add: sfk replace: option -noacc to disable case insensitive search of accent and umlaut chars.
  • add: sfk udpdump: options -size, -min/maxsize to show only messages with given sizes.
  • add: sfk udpdump: option -data to filter messages by text or binary content.
  • add: sfk hexdump: support for negative offsets to dump last parts of files.
  • chg: sfk replace: options can now be placed more freely when mixed with -dir ... -file.
  • add: sfk x, alias for sfk iname for quick typing.
  • add: sfk select ... +hexfind chaining.
  • fix: hexdump -pure ... +tofile unwanted empty lines.
  • fix: udpsend: now accepts 0xn with uneven length.
  • fix: sfk hexfind under linux: hex dump too lean.
  • fix: replace hex dump preview of changes: whole text was highlighted instead of only the changes with bright backgrounds. multiple hits within short range caused wrong display of older hits.
  • add: sfk rawclip, same as sfk fromclip +toclip to remove unwanted formatting from text
  • add: sfk for windows: extra help text on how to use the console if sfk is started from windows explorer.
  • chg: bright background color scheme: "hit:" color changed from red to green as it was the same as error color.
  • add: help text: info about how to escape characters % and $ in batch files
  • add: udpdump: -bonjour preset option
  • add: SFK OSE solaris compile support.
  • chg: sfk hex: now printing an error on non numeric parameters, to avoid confusion with hexfind
  • fix: syntax errors produced memory leak warnings
  • add: support for -verbose=0
  • add: sfk xe: hexdump of zip file contents.
  • chg: command name "grep" no longer documented as it is misleading, use only sfk find.

New in Swiss File Knife 1.6.8 Revision 0 (Jul 10, 2013)

  • add: sfk index, create index files with all filenames of a folder, the whole disk, or all disks for later realtime name lookup with sfk iname.
  • add: sfk iname, find filenames as fast as possible by using index files created with sfk index.
  • fix: sfk open source compile: list -qarc to list archive contents didn't work. help text info about -arc option was incorrect with many commands.
  • fix: sfk list -tab -size dirname: size field is no longer padded with blanks.
  • fix: sfk list -size=n and possibly other commands producing blank padded numbers: numbers were always prefixed by a useless blank.

New in Swiss File Knife 1.6.7 Revision 3 (Jun 21, 2013)

  • add: partcopy: support for offsets relative to file end, and to copy all data from an offset without specifying the length.
  • fix: sfk list \ did not work.
  • fix: sfk list -time -tofile out.txt did not work.
  • add: udpdump, udpsend: experimental multicast send/receive.

New in Swiss File Knife 1.6.7 Revision 2 (Jun 21, 2013)

  • chg: ftp server: auto close of current connection if another incoming connection is seen.
  • required for clients like Filezilla.
  • chg: ftp server: rework of status codes, using standard codes now in most cases.
  • add: ftp server: support for FEAT command, also before login, to support more clients.
  • add: ftp server: option -minspace to set required minimum free disk space for file writing.

New in Swiss File Knife 1.6.7 (Apr 29, 2013)

  • CHG: SFK FTPSERV CHANGE IN DEFAULT BEHAVIOUR: By default, - current dir AND ALL SUB DIRS is made accessible. use option -nosub to disable. - with -rw, files of ANY size can be written. use option -maxsize=n to set a limit. - inactivity timeout is now 60 seconds. - if a single working directory name is given then listed filenames are no longer prefixed by this directory name. This means options -deep, -anysize, -rwany are deprecated. Just type "sfk ftpserv -rw" to allow full read/write access to the current folder.
  • CHG: SFK STAT SYNTAX CHANGE: -minsize=100 now means 100 bytes, but no longer 100 megabytes. use -minsize=100m to specify megabytes, or -minsize=1g to list files larger 1 gbyte. change was done to be consistent with general -minsize option used with other commands.
  • CHG: SFK FTPSERV -MAXSIZE SYNTAX CHANGE: -maxsize=100 now means 100 bytes, and the smallest limit allowed is 1m for 1 megabyte. default is no size limit.
  • CHG: SFK FTPSERV with SFK FTP client: - improved transfer of file attributes. esp. between linux machines (rwx of owner etc.) - "dir" now lists real file attributes as on disk, no matter if server runs with -rw or not. - older sft clients may no longer list dir names as they incorrectly expect "-" in the attribs. - no longer listing text/binary infos per file for better listing performance.
  • CHG: SFK FTPSERV major rework: - now accepts commands case insensitive. - optional user name configuration. - support for commands to change dir, create dir, delete file or dir, list sub directory contents. should now work better with some ftp clients.
  • FIX: SFK FTP CLIENT: mget .ext, mput .ext didn't work.
  • FIX: ftp client: correct display of multi line replies.
  • CHG: sfk ftp client: interactive mode no longer verbose by default.
  • chg: sfk wget single file download no longer tries to use caching via TEMP folder.
  • CHG: info text color changed as it was unreadable under windows with black shell background. - add: sfk ftpserv: rmtree command.
  • ADD: sfk select -minsize=3m -maxsize=10m mydir ... to list or process only files within the given size range.
  • ADD: sfk media, cut and join video and binary files.
  • ADD: sfk touch, change times of file(s).
  • ADD: sfk filetime, list times of a file.
  • AD: sfk license, print the license text.
  • FIX: sfk echo foo +filter "$col1" showed no error.
  • FIX: sfk udpsend to multicast: get ownhost failed.
  • FIX: sfk stat dirname .mask always told "0 files".
  • FIX: sfk replace (variable length) in readonly file: produced memory leak error.
  • FIX: copy under linux: empty (zero) access times may have been set to random values in output.

New in Swiss File Knife 1.6.6 (Oct 9, 2012)

  • CHG: COLORS UNDER LINUX: if environment variable SFK_COLORS is now set to anything other than "off", colors are activated (no ",on" required). theme:black now uses a default color 14, i.e. bright gray or non bright white.
  • add: sfk netlog, send text output to network, and/or to logfile, and/or to terminal.
  • add: sfk list: options -maxfiles and -fileoffset to list only a subset of selected files.
  • add: sfk find: option -firsthit to list only first match per file.
  • add: sfk udpdump: option -from to show only messages from specific server.
  • add: sfk filter: option -global-unique for processing of multiple text files.
  • add: sfk filter: option -keep after -unique to always keep some lines, like separators, even if uniqueness is selected.
  • add: sfk ... +append[to] filename, alias for sfk ... +tofile -append filename
  • add: sfk filter, hexfind, find: option -justrc prints no output at all, to set return code silently on matching text.
  • add: mac compile: detection of __APPLE__ symbol.
  • add: sfk runloop: option to delay per command.
  • chg: automatic IP expansion: no longer showing the [using ip] info message by default. use option -showip to see expansion result.
  • fix: sfk ftp client under linux: did not stop by ctrl+c while trying to connect to a server.
  • fix: sfk help colors: examples for SFK_COLORS didn't work under linux as ",on" was missing. now "on" is done implicitely, see CHG entry above.
  • fix: sfk rmtree simulation always told "0 dirs would be deleted".
  • fix: sfk udpdump >out.txt empty file on small output due to missing flush.
  • fix: sfk base: replace -firsthit did not work with replacement patterns of different length.
  • fix: sfk fromclip: -wait, -clear not usable.

New in Swiss File Knife 1.6.5 Revision 4 (Jul 14, 2012)

  • CHG: sfk ftp/sft mput: now always stops by default on the first file that fails to send. use option -force to override.
  • add: sfk ftp/sft mput: option -force to continue file transfer after errors.
  • chg: sfk ftp/sft mput: rework of error handling and statistics output.
  • fix: sfk ftp/sft put/mput: file was deleted at server even if it did not exist at client.

New in Swiss File Knife 1.6.5 Revision 3 (Jul 14, 2012)

  • Revision 3:
  • add: sfk diskspace, tell total and free size of current or specified volume.
  • fix: crash of sftserv, httpserv on embedded Linux due to uncatched null pointers in own IP detect.
  • fix: sfk sel -arc testfiles !.zip selected nothing due to wrong internal mask conversion

New in Swiss File Knife 1.6.5 Revision 2 (Jun 4, 2012)

  • FIX: sfk replace: crash on -bylist files ending with a line without linefeed.
  • add: help text infos about Shell Command Characters like < and > that often cause unreadable syntax error messages.
  • add: sfk replace: option -spatstrict for strict slash patterns, producing an error on undefined sequences like \m within C:\myproj.
  • add: sfk httpserv: support for -dir parameter allowing to specify multiple dirs for reading.
  • add: sfk hexfind, sfk replace: option -firsthit to process only first pattern match per file.
  • add: help text documentation of -debug option.
  • add: sfk for windows: option -debug now also runs a memory list check after each command.
  • add: sfk for windows: option -memcheck to detect memory overwrites.
  • fix: sfk replace ... -dir ... -yes didn't work.
  • fix: sfk ... +linelen now works as documented.
  • fix: sfk linelen -quiet: did not produce the expected return code.

New in Swiss File Knife 1.6.5 (Mar 1, 2012)

  • improved file splitting command,
  • improved ftp client,
  • added verbosity options.

New in Swiss File Knife 1.6.4 (Nov 14, 2011)

  • fix: sfk select ... +copy ... crashed esp. on linux.
  • fix: sfk httpserv: filenames with blanks or special characters could not be transferred.
  • fix: sfk wget: no longer including port number in Host header if it's default port 80.
  • fix: hextobin: now also accepts single character hex expressions like "0xa".
  • fix: windows compile with mingw.
  • add: tarball with configure script.
  • add: sfk chars: options -hexlist, -hexsrc.
  • add: sfk httpserv: mime type for favicon.ico file.

New in Swiss File Knife 1.6.3 Revision 4 (Nov 7, 2011)

  • add: sfk hexdump: options -notrail, -norectrail, -recsize for hex/decsrc output format.
  • fix: sfk hexdump -offlen : hex values didn't work when ending with non-digit characters.
  • fix: sfk hexdump -pure -offlen : offlen was ignored.
  • fix: sfk hexdump -offlen : ignored length values not being a multiple of no. of output bytes.
  • add: sfk filter help text: reference to printf.

New in Swiss File Knife 1.6.3 Revision 3 (Oct 14, 2011)

  • bugfix: sfk list -dir anydir -file foo*.txt did not select any files.

New in Swiss File Knife 1.6.3 (Sep 27, 2011)

  • CHG: SYNTAX CHANGE: option -sub no longer means "include sub directories". inclusion of sub dirs was default on nearly every SFK command, so this option made no sense anyway. Nevertheless, CHECK YOUR BATCH FILES if you used -sub anywhere, and if so, rewrite as "-withsub" !
  • Option -nosub to disable sub directory processing stays as is.
  • The NEW option -sub starts a list of sub directory masks
  • It can also be written as -subdir
  • CHG: SYNTAX CHANGE: exclusion of sub directories within current dir or a given root dir was inconsistent.
  • CHG: SYNTAX CHANGE: selection of files is now done just like sub directory selection
  • chg: improved help text of help select, help fileset and sfk snapto.
  • fix: file selection in top level folders within current dir "." using path masks: start of folder name comparison by slash fixed.
  • fix: sfk find -lnum ... +filter chaining produced line numbers at the wrong place.
  • fix: help text typos.

New in Swiss File Knife 1.6.2 Revision 2 (Aug 29, 2011)

  • fix: sfk copy: stop of copy by CTRL+C produced a garbage file with wrong content. Under windows, the file has the same size as the original, but incomplete content (md5 over both files tells the difference). Now, if sfk is stopped by CTRL+C within a file copy, it produces a warning "copy stopped, cleanup done".
  • fix: sfk ftp server and client: stop by CTRL+C during a file transfer produced garbage file without cleanup in some cases.
  • add: sfk udpsend to send udp messages.

New in Swiss File Knife 1.6.2 (Aug 7, 2011)

  • FIX: sfk select -withdirs, -justdirs: if a path mask is given like in -dir mydir *mymask* then all sub folders of mydir were listed. now only matching sub folders are selected.
  • fix: sfk ftpserv: unexpected forbidden path during transfer of files with "..." in their name.
  • fix: sfk ftpserv, httpserv: cleanup of files where transfer was interrupted or incomplete.
  • add: sfk late: alias for sfk list -late.
  • add: sfk version: option -number to print only the whole version number of a binary.
  • add: sfk require to check versions in a script.
  • add: sfk ftp: support for username/pw authentication.
  • add: sfk ftp: -nohead now also disables the message "using SFK_FTP_PW for authentication".
  • chg: sfk patch: max lines per target file changed from 50000 to 500000.
  • fix: compile warnings about unused return codes.
  • fix: missing progress output on FTP send/receive.

New in Swiss File Knife 1.6.1 (Jun 19, 2011)

  • add: sfk file transfer: SFT protocol 103 no longer uses md5 verify by default for faster transfer. It is assumed that TCP mechanisms below provide checksum verifications already. to use verify now, specify option -verify at the client.
  • add: multi file transfer: no. of seconds info.
  • add: sfk sftserv -rwany: alias for -rw -anysize -deep.
  • add: sfk filter -tabform to split and reformat tab separated data easily.
  • add: sfk list: option -flattime to list filetimes in a compact format like YYYYMMDD hhmmss for better post processing.
  • add: sfk list: option -tabs to separate columns produced by -time and -size with tab characters, for post processing by +filter -tabform ...
  • add: sfk list: help example on how to rename all.jpg in a folder to include their file time.
  • CHG: invalid time representation: whenever a time was unreadable or not calculated, it was shown as "99991231235959" or "9999-12-31 23:59:59". The new display for invalid time stamps is "19000100000000" or "1900-01-00 00:00:00".
  • CHG: sfk detab: now skips files larger than the default memory limit (300 MB). use option -memlimit=n to detab larger text files.
  • add: sfk detab: handling of general options like -nowarn for more quiet operation.
  • fix: sfk filter -cut * to pattern: if pattern was not found, produced empty text. now this is detected, and either the file is not rewritten at all, or processing is stopped. option -nocheck enforces old behaviour.
  • fix: sfk dupfind: stopped at first unreadable file. now it skips those files and continues.
  • fix: sfk dupfind: added out of memory checks.
  • fix: missing out of memory message on creation of many file objects in memory.
  • fix: sfk detab: text files containing NULL bytes after the first 4 kbytes were truncated, now they are skipped.
  • fix: sfk file transfer: unexpected forbidden path by ftp server due to ".." within path names.
  • fix: sfk replace: wrong info display for >2 billion hits.
  • fix: some help text typos.
  • fix: added parameter check for internal functions.
  • opt: sfk file receive with verify: checksum was calculated twice, wasting cpu time.
  • del: deprecated functions synctext, maptext removed.

New in Swiss File Knife 1.5.8 (Nov 5, 2010)

  • Filter command now may list context lines. Detab now provides a simulation mode.
  • Some bug fixes.

New in Swiss File Knife 1.5.7 (Aug 2, 2010)

  • BEHAVIOUR CHANGE: sfk tail: now internally uses "seek" instead of "stat" to determine the current file size, as "stat" often fails to reflect file size changes in realtime. use option "-altsize" for old behaviour.
  • Added: sfk list, sfk help select: examples for exclusion of files and sub folders.
  • Added: sfk ftp and other network client commands: automatic expansion of target ip number, e.g. sfk ftp 23 == sfk ftp 192.168.1.23 if the current host ip is 192.168.1.x.
  • Added: sfk sft, alias for sfk ftp using port 2121.
  • Added: sfk sftserv, alias for sfk ftpserv w/port 2121. sft means simple file transfer protocol, which cannot be used on port 21 on systems like windows 7.
  • Added: sfk webrequest: send a plain HTTP request and show the reply text with headers.
  • Added: sfk webserv: now also handles HEAD requests, so sfk wget to an sfk webserver no longer produces error messages.
  • Added: sfk list ... +sft support (ftp on port 2121).
  • Fixed: sfk list mydir .1.cpp did not list .1.cpp files and list mydir !.1.cpp did not exclude them due to incomplete file extension comparison.

New in Swiss File Knife 1.5.6 (Jan 31, 2010)

  • Copy command, wget, some http support, detail improvements and bug fixes.

New in Swiss File Knife 1.5.5 (Sep 1, 2009)

  • add: sfk filter -form "$count" or "$(count+n)"
  • to insert the output line numer with an
  • optional offset that is added.
  • add: sfk filter -form "$()" format with brackets
  • to work around parameter collisions
  • within sfk scripts.
  • add: apple mac experimental binary build.
  • define MAC_OS_X whenever compiling on mac.
  • define MAC_OS_X_PPC or MAC_OS_X_I686 to have
  • the cpu type included in the version info.
  • add: sfk ftpserv: now showing own ip under windows.
  • add: sfk make-random-file -text: text file contents
  • are now more randomly with varying line lengths.
  • add: sfk loop help text, and listing in main help.
  • add: sfk md5: option -verbose to list execution time.
  • add: sfk md5: performance improvement.
  • add: sfk filter: help section "common errors."
  • add: sfk treesize, an alias for sfk stat.
  • add: better error output on network errors.
  • add: sfk ftpserv, ftp client help text solution
  • on windows 7 connection blockings.
  • chg: changed SFK_IO_BLOCK_SIZE to 10 MB,
  • which is still far below the Windows 60 MB limit.
  • fix: sfk ftpserv: now produces a speaking error
  • if user connects with http protocol.
  • fix: -fileset using "names with blanks" did't work.
  • now such names can be used with double quotes.
  • fix: sfk list -withdirs/-justdirs -dir a -file b :
  • the file mask was ignored, the command always
  • listed all directories. now, IF file masks are
  • given, then list only the names of directories
  • containing at least one matching file.
  • fix: sfk list -withdirs -since ... : did list all
  • directories ignoring the -since option.
  • fix: sfk windows: list on UNC paths' root dir failed,
  • e.g. sfk list \anyhost ootdir
  • now using GetFileAttributesEx in that case.
  • fix: sfk split: failed on ext2 partitions,
  • and probably with all network files,
  • due to windows bug on file read blocks > 60 MB.
  • now ALL fread/fwrite calls are mapped to calls
  • that use smaller blocks for I/O.
  • fix: some root directories on mounted filesystems were
  • skipped due to wrong interpretation as duplicates,
  • as they had the same inode number. now the st_dev
  • number is also taken for file identification.
  • fix: additional buffer safety in ProgressInfo output.
  • fix: now blocking some signals like SIGPIPE that stopped
  • a linux sfk server if the client closed connection.
  • fix: missing shutdown on socketclose may have lead
  • to missing data at the end of some tcp connections.

New in Swiss File Knife 1.5.3 (Jan 24, 2009)

  • opt: READ PERFORMANCE OPTIMIZATION: reading lines from text files should now be >= 5 times faster.
  • add: content listing of nested .tar, .tar.gz and .tar.bzip2 archives (also in base/xd).
  • add: reflist: now accepts option -memlimit.
  • chg: option -wrap can now be used locally on comands.
  • fix: listing of tar archive content times.
  • fix: sfk filter -rep crashed on stream text if the replacements incremented the text length.
  • fix: md5check: always told 0 kb/sec statistic.

New in Swiss File Knife 1.4.5 (Dec 27, 2007)

  • add: partcopy, copy parts of binary files.
  • add: hexdump: -offlen option to dump file parts.
  • fix: hexfind: search within files > 2GB.
  • fix: hexfind: seek error message now w/o write text.
  • fix: size parameters: now accepting 64 bit 'b' value.
  • add: size parameters: 'b' is now optional.
  • add: size parameters: with no postfix given, sfk now assumes a byte size.
  • add: support for 0x hex values on some size and offset string parameters.