Swiss File Knife is a supercharged command line tool which crams around 100 functions into a single executable.
The program can search for files by content, or name. It's able to list the contents of directories, create or delete directory trees. And you get a lengthy list of text and file processing options: LF <> CRLF, tab <> space, hex <> binary, hex <> dec, insert string, replace string, sort string, split file, join file, more.
This would be useful in itself, but Swiss File Knife does a whole lot more. The program also includes commands to synchronise a folder tree, find duplicate files, cut video and binary files, create MD5 hashes, send UDP or HTTP requests, download HTTP files, even run instant FTP and HTTP servers.
Most of these commands deliver far more than you'd expect. The List command doesn't just list files in a directory tree, for example: it also supports a host of archive formats. And it's enormously flexible, with more than 35 switches, which can themselves be combined in many different ways, and have their output passed on to other Swiss File Knife commands.
There's also plenty of scripting support, with tools to get user input, run sequences of Swiss File Knife commands, run commands on every file in a folder, run commands in a loop, and more.
Perhaps most surprising of all, though, Swiss File Knife isn't too difficult to learn. There's a lot to explore, but the syntax of each command is relatively straightforward. When listing files, for example, there's no "-n -l -p" garbage: instead you'll use switches like -time, -hidden, -sort, -minsize, -maxsize and so on. You can probably guess what they do already. And if you can't, a truly excellent PowerShell-like local Help system explains all.
- 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
- 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
- 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
- doc: extended echo help.
- doc: reworked help for sfk script.
- doc: help text for sfk then.